OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

Mac User and get GUI type

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API
View previous topic :: View next topic  
Author Message
pitonyak
Administrator
Administrator


Joined: 09 Mar 2004
Posts: 3618
Location: Columbus, Ohio, USA

PostPosted: Sun Jul 11, 2010 4:47 pm    Post subject: Mac User and get GUI type Reply with quote

Decided to write a third edition to my published book, and I wanted to test the following macro on a MAC

Code:
Sub MainGetGui
  Print GetGUIType()
End Sub


Can anyone tell me what this returns on a MAC?
_________________
--
Andrew Pitonyak
http://www.pitonyak.org/oo.php
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address
probe1
Moderator
Moderator


Joined: 18 Aug 2004
Posts: 2465
Location: Chonburi Thailand Asia

PostPosted: Sun Jul 11, 2010 7:41 pm    Post subject: Reply with quote

Andrew,

according to online help a value of 3 will be returned.

Note: the same source says the return value isn't defined in a client-server environment. This may lead to the conclusion not using the runtime function at all.


edit: corrected value
_________________
Cheers
Winfried
My Macros
DateTime2 extension: insert date, time or timestamp, formatted to your needs


Last edited by probe1 on Mon Jul 12, 2010 1:09 am; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
pitonyak
Administrator
Administrator


Joined: 09 Mar 2004
Posts: 3618
Location: Columbus, Ohio, USA

PostPosted: Sun Jul 11, 2010 7:48 pm    Post subject: Reply with quote

Did you run a test to verify this?

My version of the code mentions windows and Unix. There used to be specific mention for a mac in the help as returning a 3.

Does your help specifically claim that a Mac return a 4?

The source code reads as follows:

Code:
#if defined (WNT)
      rPar.Get(0)->PutInteger( 1 );
#elif defined OS2
      rPar.Get(0)->PutInteger( 2 );
#elif defined UNX
      rPar.Get(0)->PutInteger( 4 );
#else
      rPar.Get(0)->PutInteger( -1 );
#endif


My expectation is that it will return a 4 because current macs are based on Unix, but, I wanted to state that explicitly.
_________________
--
Andrew Pitonyak
http://www.pitonyak.org/oo.php
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address
probe1
Moderator
Moderator


Joined: 18 Aug 2004
Posts: 2465
Location: Chonburi Thailand Asia

PostPosted: Mon Jul 12, 2010 12:58 am    Post subject: Reply with quote

Oh, yes...sorry for confusion.


I use 3.0.1/Linux and Help states:
Quote:
Rückgabewerte:
1 : Windows
3 : Mac OS
4 : UNIX




And no: never verify any other platform than Windows and Linux
_________________
Cheers
Winfried
My Macros
DateTime2 extension: insert date, time or timestamp, formatted to your needs
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group