archive-de.com » DE » A » ACAPIO.DE

Total: 146

Choose link from "Titles, links and description words view":

Or switch to "Titles and links view".
  • Acapio! - Anleitungen, Tutorials, Tipps, HowTos aller Art
    my cocoa apps i m often saving some user or application data e g in NSString folder Library Application Support MyAppName appData xyz But for testing you need to modify or delete that files And I m always start from beginning where to find that file in debug mode Because it is not saved to the real path XCode save the files in a Container named like the bundle identifier

    Original URL path: http://www.acapio.de/Programmierung/XCode/Path_of_saved_user_or_application_data_in_Debug-Mode/index.html (2016-04-25)
    Open archived version from archive


  • Acapio! - Anleitungen, Tutorials, Tipps, HowTos aller Art
    coding you should put a Close Button to your new window You will need that button to get rid of the window Here is the code for header file interface MyOwnWindowController NSWindowController NSWindow mainWindow IBAction closeButtonPressed id sender void beginSheet NSWindow mainWindow void endSheet end Here is the code for implementation file import MyOwnWindowController h interface MyOwnWindowController end implementation MyOwnWindowController id init The nibname is the name of the window or xib file self super initWithWindowNibName MyOwnWindow owner self if self return self an IBAction Method for closing the window IBAction closeButtonPressed id sender self endSheet method to display window modal void beginSheet NSWindow mainWindow mainWindow mainWindow NSApp beginSheet self window modalForWindow mainWindow modalDelegate self didEndSelector selector endSheet contextInfo nil method to remove the myownwindow void endSheet NSApp endSheet self window self window orderOut mainWindow end In your delegate file of the mainwindow the subclass is allocated and initialized To display the window you call beginSheet myOwnController MyOwnWindowController alloc init myOwnController beginSheet window So far so good But it doesn t work like expected The window doesn t slide in from top of the main window and is displayed somewhere on the screen but not in the top middle And it cost me a lot of time to get the mistake So pay attention that you disable the property Visible At Launch in Attribute Inspector for the modal window Please pay also attention that you don t do something like this Because it can drive you crazy if you have defined IBOutlets oder IBActions in MyMyOwnWindowController e g for the Cancel Button IBAction menuItemPressed id sender MyOwnWindowController myOwnController MyOwnWindowController alloc init myOwnController beginSheet window When pressing the Cancel Button or calling another IBAction your application will crash without a helpful error message That happens when you are using ARC because

    Original URL path: http://www.acapio.de/Programmierung/XCode/Set_Modal_Window/index.html (2016-04-25)
    Open archived version from archive

  • Acapio! - Anleitungen, Tutorials, Tipps, HowTos aller Art
    folder in Finder Therefore you can use NSWorkspace To open a folder in Finder by button click use an IBAction method similar to this We are using here Objective C is called when a specific button is pressed IBAction openFinderPressed id sender if folderURL nil NSWorkspace sharedWorkspace openURL folderURL If you want select directly a file in Finder you can call NSWorkspace sharedWorkspace selectFile filePath inFileViewerRootedAtPath nil The NSWorkspace sharedWorkspace

    Original URL path: http://www.acapio.de/Programmierung/XCode/Show_folder_-_file_in_Finder_by_button_click/index.html (2016-04-25)
    Open archived version from archive

  • Acapio! - Anleitungen, Tutorials, Tipps, HowTos aller Art
    modal you create a new subclass of NSWindowController In the same step you can create the xib file for Interface Builder like shown in the image below Before you start coding you should put a Close Button to your new window You will need that button to get rid of the window Here is the code for subclassing NSWindowController import Cocoa class MyModalWindowController NSWindowController var mainW NSWindow NSWindow init super init init window NSWindow super init window window Initialization code here init coder NSCoder super init coder coder override func windowDidLoad super windowDidLoad Implement this method to handle any initialization after your window controller s window has been loaded from its nib file method called to display the modal window func beginSheet mainWindow NSWindow self mainW mainWindow NSApp beginSheet self window modalForWindow mainWindow modalDelegate self didEndSelector nil contextInfo nil method called when Close Button clicked IBAction func btnClicked sender AnyObject self endSheet method called to slide out the modal window func endSheet NSApp endSheet self window self window orderOut mainW In your delegate file of the mainwindow the subclass is allocated and initialized To display the window you call beginSheet import Cocoa class AppDelegate NSObject NSApplicationDelegate IBOutlet var window NSWindow var mdlwin MyModalWindowController windowNibName MyModalWindowController func applicationDidFinishLaunching aNotification NSNotification Insert code here to initialize your application func applicationWillTerminate aNotification NSNotification Insert code here to tear down your application method called when button Show Modal Window is pressed IBAction func buttonShowModalWindowPressed sender AnyObject mdlwin beginSheet self window So far so good But it doesn t work like expected The window doesn t slide in from top of the main window and is displayed somewhere on the screen but not in the top middle And it cost me a lot of time to get the mistake So pay attention that you disable

    Original URL path: http://www.acapio.de/Programmierung/XCode/Swift_-_Display_window_as_modal/index.html (2016-04-25)
    Open archived version from archive

  • Acapio! - Anleitungen, Tutorials, Tipps, HowTos aller Art
    a class you can compare them exactly with this code if myCatObject class MyCatClass class do something with your cat The same you can achieve with isMemberOfClass method wich returns a Boolean value that indicates whether the receiver is an instance of a given class if myCatObject isMemberOfClass MyCatClass class do something with your cat The static class method returns the class object If you like to find out wether

    Original URL path: http://www.acapio.de/Programmierung/XCode/TypeOf_Class_Compare/index.html (2016-04-25)
    Open archived version from archive

  • Acapio! - Anleitungen, Tutorials, Tipps, HowTos aller Art
    subversion SVN or github repository the big question is wich files or folders can be ignored In an OSX project I usually put the both folders xcuserdate project xcworkspace complete to the ignore list Behind that folder are files like xcurrentversion Breakpoints v2 xcbkptlist project xccheckout UserInterfaceState xcuserstate WorkspaceSettings xcsettings xcschememanagement plist myproject xcscheme contents xcworkspacedata The image below shows the folder tree of my project Asset Scaler with marked

    Original URL path: http://www.acapio.de/Programmierung/XCode/Wich_project_files_can_be_ignored_from_repository/index.html (2016-04-25)
    Open archived version from archive

  • Acapio! - Anleitungen, Tutorials, Tipps, HowTos aller Art
    code At first create the alert view with all needed buttons and text To parameter didEndSelector you write the method wich is called if alert is finshed by clicking at one of the defined buttons NSAlert alert NSAlert alloc init alert setAlertStyle NSInformationalAlertStyle alert setMessageText myMessage alert addButtonWithTitle Cancel alert addButtonWithTitle Okay alert beginSheetModalForWindow window modalDelegate self didEndSelector selector alertDidEnd returnCode contextInfo contextInfo nil At second you need the alertDidEnd

    Original URL path: http://www.acapio.de/Programmierung/XCode/XCode_NSAlert_Message_Dialog_Example/index.html (2016-04-25)
    Open archived version from archive

  • Acapio! - Anleitungen, Tutorials, Tipps, HowTos aller Art
    Home Webseiten Webseiten HTML Gästebuch in eigene Homepage einbinden HTML 5 Grundgerüst Schnelle Homepage Erstellung mittels Baukastenprinzip Online Shop erstellen Ga stebuch in eigene Homepage einbinden HTML 5 Grundgeru st Server Backup Owncloud Apache HtAccess MP3 Datei Download statt Player

    Original URL path: http://www.acapio.de/Webseiten/index.html (2016-04-25)
    Open archived version from archive



  •