Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function loadSavedProfile(path:String):void{
- var exists:File = new File(path);
- if (!exists.exists) {
- FlexGlobals.topLevelApplication.dispatchEvent(new BusinessLayerEvents(BusinessLayerEvents.LOAD_PROFILE_ERROR, false, false));
- }
- else {
- addEventListener(BusinessLayerEvents.INTERNAL_OPERATION_COMPLETED, function(event:BusinessLayerEvents):void
- {
- fstream.writeUTFBytes("finished refresh()\n");
- removeEventListener(BusinessLayerEvents.INTERNAL_OPERATION_COMPLETED, arguments.callee);
- _internal = true;
- _dbFilePath = path;
- _tempFile = File.createTempFile();
- _dbFile = new File();
- _dbFilePath = path;
- _dbFile.nativePath = _dbFilePath;
- _dbFile.addEventListener(Event.COMPLETE, function(e:Event):void
- {
- fstream.writeUTFBytes("Copying imported db to temp file complete\n");
- _dbFile.removeEventListener(Event.COMPLETE, arguments.callee);
- _conn.addEventListener(SQLEvent.CLOSE, handleLoadingProfileDBClosed);
- _conn.close();
- });
- _dbFile.copyToAsync(_tempFile, true);
- });
- refresh();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement