Xojo Conferences
MBSOct2019CologneDE

Change ProcID at runtime (Real Studio network user group Mailinglist archive)

Back to the thread list
Previous thread: Re: Little-endian 32-bit number as string
Next thread: Moving a line across a graphic


RE: Image Scaling in an Image Well   -   Edward Cox
  Change ProcID at runtime   -   Mike B
   Re: Change ProcID at runtime   -   Joseph J. Strout
    Re: Change ProcID at runtime   -   Mike B

Change ProcID at runtime
Date: 08.05.02 21:39 (Wed, 08 May 2002 22:39:55 +0200)
From: Mike B

Is there a way of changing the MacProcID at runtime? I have a window that
when run in OSX I want to have an ID of 1 but when it is in Classic have an
ID of 0. I have tried using the code below but nothing seems to change and
the window uses the same ID it has in the properties window.

#If TargetMacOS then
#if TargetPPC or Target68 then
Me.MacProcID#else
Me.MacProcID#endif
#endif

Thanks in advance
Mike

---
Subscribe to the digest:
<mailto:<email address removed>>
Unsubscribe:
<mailto:<email address removed>>

Re: Change ProcID at runtime
Date: 09.05.02 01:03 (Wed, 8 May 2002 17:03:51 -0700)
From: Joseph J. Strout
At 10:39 PM +0200 5/8/02, Mike B wrote:

>Is there a way of changing the MacProcID at runtime?

No.

> I have a window that when run in OSX I want to have an ID of 1 but
>when it is in Classic have an ID of 0.

The code you posted wouldn't do this anyway (the logic is wrong).
You can't use a #if test to check for a runtime condition (remember,
a Carbon app may be running under OS 8, 9, or 10, and this is not a
compile-time choice!).

So if you really need different MacProcIDs, you'll need two different
windows, and decide which to make at runtime based on the system
version (see System.Gestalt).

Cheers,
- Joe

Re: Change ProcID at runtime
Date: 09.05.02 13:32 (Thu, 09 May 2002 14:32:50 +0200)
From: Mike B
On 9/5/02 13:00, "REALbasic Network Users Group"
<<email address removed>> wrote:

> At 10:39 PM +0200 5/8/02, Mike B wrote:
>
>> Is there a way of changing the MacProcID at runtime?
>
> No.
>
>> I have a window that when run in OSX I want to have an ID of 1 but
>> when it is in Classic have an ID of 0.
>
> The code you posted wouldn't do this anyway (the logic is wrong).
> You can't use a #if test to check for a runtime condition (remember,
> a Carbon app may be running under OS 8, 9, or 10, and this is not a
> compile-time choice!).

No, I was trying to give an example but not thinking when I was doing it.

>
> So if you really need different MacProcIDs, you'll need two different
> windows, and decide which to make at runtime based on the system
> version (see System.Gestalt).
>

Yes, this is what I have done, thanks.

Mike

---
Subscribe to the digest:
<mailto:<email address removed>>
Unsubscribe:
<mailto:<email address removed>>