Recent

Author Topic: Application.MessageBox-very big window!  (Read 20726 times)

abb

  • New Member
  • *
  • Posts: 40
Application.MessageBox-very big window!
« on: March 10, 2007, 03:59:04 pm »
I'm trying to create a simplest carbon app. I've placed a TButton on a TForm and have added the OnClick eventhandler:

Code: [Select]
procedure TForm1.Button1Click(Sender: TObject);
begin
  Application.MessageBox('Button 1 is clicked',
                         'Information',
                         MB_OK);
end;

As a result a very large window appears on the screen -- I even don't see its title, but fortunately see the OK button at the bottom of screen, so I yet can close it... How to adjust the size of a messagebox window?

Also is there a special forum/section here to discuss several widgets, in particular Carbon widget?

Thanks in advance!

Zomis

  • Jr. Member
  • **
  • Posts: 95
RE: Application.MessageBox-very big window!
« Reply #1 on: March 11, 2007, 04:22:39 pm »
Try the MessageDlg function in the Dialogs unit instead. See if that's any different. If it's the same, then something's probably wrong with your widgetset.

Phil

  • Hero Member
  • *****
  • Posts: 2750
Re: Application.MessageBox-very big window!
« Reply #2 on: March 11, 2007, 06:44:40 pm »
Quote from: "abb"
I'm trying to create a simplest carbon app. I've placed a TButton on a TForm and have added the OnClick eventhandler:

Code: [Select]
procedure TForm1.Button1Click(Sender: TObject);
begin
  Application.MessageBox('Button 1 is clicked',
                         'Information',
                         MB_OK);
end;

As a result a very large window appears on the screen -- I even don't see its title, but fortunately see the OK button at the bottom of screen, so I yet can close it... How to adjust the size of a messagebox window?

Also is there a special forum/section here to discuss several widgets, in particular Carbon widget?

Thanks in advance!


MessageBox has been implemented. Get the latest snapshot or recompile from SVN source.

I would suggest posting questions about Carbon under the OS X topic.

abb

  • New Member
  • *
  • Posts: 40
Re: Application.MessageBox-very big window!
« Reply #3 on: March 12, 2007, 12:41:15 pm »
Quote from: "Phil"
MessageBox has been implemented. Get the latest snapshot or recompile from SVN source.

I have 2007/02/25 version of both FPC and Lazarus. Are they not too fresh??? Can you explain how to update from SVN? I never delt with SVN...
Quote from: "Phil"
I would suggest posting questions about Carbon under the OS X topic.

OK, can you move this topic into that section? I beleaved that this is not an installation issue, so I decided to post it here... It would be good to have the OS-dependent areas not only for installation but also for development discussions. Hope you agree...

matthijs

  • Hero Member
  • *****
  • Posts: 537
Re: Application.MessageBox-very big window!
« Reply #4 on: March 12, 2007, 04:52:18 pm »
Quote from: "abb"

I have 2007/02/25 version of both FPC and Lazarus. Are they not too fresh??? Can you explain how to update from SVN? I never delt with SVN...

Did you have a look at Getting the source?
What's in a sig? Would my posting look less if it didnot have a sig? (Free after William S.) :)

:( Why cannot I upload my own Avatar? :(

Phil

  • Hero Member
  • *****
  • Posts: 2750
Re: Application.MessageBox-very big window!
« Reply #5 on: March 12, 2007, 11:40:57 pm »
Quote from: "abb"
I have 2007/02/25 version of both FPC and Lazarus. Are they not too fresh??? Can you explain how to update from SVN? I never delt with SVN...


See the wiki for SVN stuff. If you install a more recent snapshot the compiled Carbon units will automatically be installed for you. I believe the patch was applied 2/26 so you just missed it.

I have no way of moving your message.

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3541
RE: Re: Application.MessageBox-very big window!
« Reply #6 on: March 13, 2007, 04:54:50 pm »
I moved the topic.

abb

  • New Member
  • *
  • Posts: 40
Re: Application.MessageBox-very big window!
« Reply #7 on: March 13, 2007, 08:38:51 pm »
Quote from: "Phil"
See the wiki for SVN stuff. If you install a more recent snapshot the compiled Carbon units will automatically be installed for you. I believe the patch was applied 2/26 so you just missed it.

Ihave some troubles with SVN... Can I use daily snapshots instead of SVN? Are they not just the same? I've downloaded the snapshots of March, 11. Would it be OK?

Will try to update them...

Vincent Snijders

  • Administrator
  • Hero Member
  • *
  • Posts: 2661
    • My Lazarus wiki user page
RE: Re: Application.MessageBox-very big window!
« Reply #8 on: March 13, 2007, 09:57:58 pm »
Yes, they the daily snapshots are generated from the SVN version of Lazarus.

SVN uses less bandwidth if you update regularly.

Phil

  • Hero Member
  • *****
  • Posts: 2750
Re: Application.MessageBox-very big window!
« Reply #9 on: March 13, 2007, 10:28:56 pm »
Quote from: "abb"
Will try to update them...


See "Uninstalling Lazarus and Free Pascal" in this link if you want to uninstall your old snapshots first.

http://wiki.lazarus.freepascal.org/OS_X_Programming_Tips

abb

  • New Member
  • *
  • Posts: 40
Re: Application.MessageBox-very big window!
« Reply #10 on: March 14, 2007, 12:46:52 pm »
Quote from: "Phil"
See "Uninstalling Lazarus and Free Pascal" in this link if you want to uninstall your old snapshots first.

Should I do it or is it just an optional action?

As for SVN, I have a way to get files from any direct links for much lower price (I'm paying for traffic) than to use SVN, which will really download as many bytes as it is required and I don't know how much every update is. And I have no possibility to update all this stuff everyday. As I understand I'll do it just from time to time...

Phil

  • Hero Member
  • *****
  • Posts: 2750
Re: Application.MessageBox-very big window!
« Reply #11 on: March 14, 2007, 10:19:19 pm »
Quote from: "abb"
Should I do it or is it just an optional action?


It's up to you. I always run the uninstall script so I know I'm starting with a clean slate before I install new snapshots.

If you're uncomfortable running a script with sudo that wipes out the FPC and Lazarus folders the way the uninstall script does, you can drag them one at a time to the trash. You can also modify the script as needed.

What's really needed is an uninstall script included with Lazarus and FPC snapshots that does this. My script should still work but as folders and locations and included files change, it really needs to be included with the installers to ensure that it's up to date.

I also always move my Lazarus folder from usr/local/share to my home folder so I can recompile widgetsets and of course the uninstall script doesn't know anything about this.

Vincent Snijders

  • Administrator
  • Hero Member
  • *
  • Posts: 2661
    • My Lazarus wiki user page
RE: Re: Application.MessageBox-very big window!
« Reply #12 on: March 14, 2007, 10:52:30 pm »
What is the usual way to uninstall program installed by a .pkg file in Mac OS X?

Phil

  • Hero Member
  • *****
  • Posts: 2750
Re: RE: Re: Application.MessageBox-very big window!
« Reply #13 on: March 14, 2007, 11:21:54 pm »
Quote from: "Vincent"
What is the usual way to uninstall program installed by a .pkg file in Mac OS X?


With most apps, the user just drags the .app bundle to the trash. The .app bundle is really a folder but acts like a file as far as the user is concerned.

Lazarus and FPC are development tools and don't install .app bundles but rather various files and folders under /usr/local. I suppose a script would make the most sense here and developers should be able to use it. I believe that's what Mono does.

If the Carbon widgetset could one day be used to generate a native Lazarus executable that could be distributed as part of an .app bundle, Lazarus itself could be installed in the normal /Applications or /Developers (not at my Mac, but I think that's what it's called) folder. However, the FPC and LCL compiled units and source code would probably still go under /usr/local or in the user's home folder (perhaps this could be selected at installation). Technically, compiled units and source code could also go in the .app bundle as part of the app's resources, but this probably isn't the usual place with development tools.

With a Lazarus .app bundle, the user would then be able to start Lazarus by double-clicking, drag and drop it on the dock or move it anywhere they want, and easily uninstall it by dragging it to the trash.

Note that Apple's Xcode IDE is a normal OS X app bundle.

abb

  • New Member
  • *
  • Posts: 40
Re: Application.MessageBox-very big window!
« Reply #14 on: March 15, 2007, 09:46:41 am »
Quote from: "Phil"
It's up to you. I always run the uninstall script so I know I'm starting with a clean slate before I install new snapshots.

OK, no problems, I've done it. Now MessageBox appears correctly.
Quote from: "Phil"
I also always move my Lazarus folder from usr/local/share to my home folder so I can recompile widgetsets and of course the uninstall script doesn't know anything about this.

Can you describe what adjustments are required in the Lazarus Options when such moving is done? Also can you enumerate what particular subfolders are moved? Perhaps you have a script which moves these subfolders? And perhaps there is also uninstall script for them, which can clear these "custom" subfolders, when a new snapshot is installed? Could you share such scripts with me?
Thanks.

 

TinyPortal © 2005-2018