Page 1 of 2 12 LastLast
Results 1 to 10 of 31

Thread: Problem with FreePascal + MacOS

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    And, if I understood correctly, what I need to hide the console is create a bundle for the application?
    Yes, you need to create your own bundle for application

  2. #2
    Thank you so much, my Bobs game is now working on Mac
    The only problem is I still can't get the keyboard input to work, I will try to look into Lazarus sources to see how they handle keyboard events in Carbon.
    I know people will call me masochist for not using SDL, but in iPhone SDL needs a paid license for comercial projects, and I don't want to shell out 500$ for one, so I'm writing my own window/event handling for all platforms. Only iPhone and Wii to go

    EDIT: Well, the keys are working now, it was just a stupid bug, one line changed and it is ok now.
    Another problem, I have a method called Engine.Terminate that safely unloads all resources and uses Halt to quit.
    After calling Terminate() on MacOS, it shuts down, but the operating system says "This software did not terminate correctly, open again or ignore?"
    Should I pass another a specific value to halt() instead of zero?
    Last edited by Relfos; 03-02-2011 at 07:08 PM.

  3. #3
    Quote Originally Posted by Relfos
    The only problem is I still can't get the keyboard input to work, I will try to look into Lazarus sources to see how they handle keyboard events in Carbon.
    For Carbon you need to process kEventClassKeyboard event.

  4. #4
    Quote Originally Posted by Andru View Post
    For Carbon you need to process kEventClassKeyboard event.
    Yes, I was already using that.
    The new problem, when calling Halt(), I get the message "Three Bobs quit unexpectedly, open again or ignore?"
    Do you know what is the problem?

  5. #5
    Quote Originally Posted by Relfos
    Do you know what is the problem?
    I don't know how exact you use Carbon(with your own main loop or with RunBlaBlaBla from standard Carbon API), so I can't answer you Anyway, halt is bad way to terminate your application.
    Last edited by Andru; 03-02-2011 at 07:27 PM.

  6. #6
    Hmm, a bad way, why?
    Before calling Halt() I release all allocated memory and resources, and destroy the Carbon window, well, maybe there is still something left to release, and that is causing the problem.

  7. #7
    Quote Originally Posted by Relfos
    Hmm, a bad way, why?
    Because of "maybe there is still something left to release", but halt terminate your application immediately.

  8. #8
    Quote Originally Posted by Relfos View Post
    I know people will call me masochist for not using SDL, but in iPhone SDL needs a paid license for comercial projects, and I don't want to shell out 500$ for one, so I'm writing my own window/event handling for all platforms. Only iPhone and Wii to go
    You got the prices wrong. One SDL iPhone license costs 100$ and -10% for every following iPhone license you purchase and finally down to 50$. I know it, I bought a license.
    Also your Carbon code won't work on the iPhone as only Cocoa is allowed on iOS. Carbon has marked as deprecated by Apple since Mac OS X 10.5.
    For Cocoa you should take a look at Objective-Pascal.
    Freeze Development | Elysion Game Framework | Twitter: @Stoney_FD
    Check out my new book: Irrlicht 1.7.1 Realtime 3D Engine Beginner's Guide (It's C++ flavored though)

    Programmer: A device for converting coffein into software.

  9. #9
    Oh I see, it's not that bad then, but since I already have code for all SOs, well, I just need to switch from Carbon to Cocoa then.
    Hmm, objective Pascal, does FPC have Cocoa headers?

  10. #10
    Co-Founder / PGD Elder WILL's Avatar
    Join Date
    Apr 2003
    Location
    Canada
    Posts
    6,107
    Blog Entries
    25
    This has probably been found by any of those looking into Objective-Pascal or Cocoa for Pascal, but here it is just the same: http://wiki.freepascal.org/FPC_PasCocoa

    It outlines the initial idea behind Objective-Pascal and how it was implemented by the Free Pascal compiler team. It also tells you how to enable it for your projects too.
    Jason McMillen
    Pascal Game Development
    Co-Founder





Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •