Xojo Conferences
MBSOct2019CologneDE

Detecting GetResource Failure (Real Studio network user group Mailinglist archive)

Back to the thread list
Previous thread: any way to disable the yellow button?
Next thread: Shorter Names in Dock?


Re: Jaguar RB?   -   German Bauer
  Detecting GetResource Failure   -   Will Leshner
   Re: Detecting GetResource Failure   -   Joseph J. Strout
    Re: Detecting GetResource Failure   -   Will Leshner
   Re: Detecting GetResource Failure   -   Norman Palardy

Detecting GetResource Failure
Date: 07.05.02 21:05 (Tue, 7 May 2002 13:05:36 -0700)
From: Will Leshner
Is there a way to tell when the ResourceFork's GetResource method fails?
GetResource returns a string. Apparently if there isn't enough memory to
get a resource, GetResource returns an empty string. But I presume that
a resource with nothing in it would also return an empty string. I'd
really like to know when my app is failing to get a resource and raise
an exception in that case.

Any ideas?

Thanks.

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

Re: Detecting GetResource Failure
Date: 07.05.02 21:25 (Tue, 7 May 2002 13:25:18 -0700)
From: Joseph J. Strout
At 1:05 PM -0700 5/7/02, Will Leshner wrote:

>Is there a way to tell when the ResourceFork's GetResource method
>fails? GetResource returns a string. Apparently if there isn't
>enough memory to get a resource, GetResource returns an empty
>string. But I presume that a resource with nothing in it would also
>return an empty string. I'd really like to know when my app is
>failing to get a resource and raise an exception in that case.

Try a declare to ResError.

Best,
- Joe

Re: Detecting GetResource Failure
Date: 07.05.02 21:33 (Tue, 7 May 2002 13:33:19 -0700)
From: Will Leshner
I tried that and I can try that again :) But it seemed to return 0 even
when it failed. I'm thinking that, internally, there could be resource
manager calls between the failed GetResource (or Get1Resource, or
whatever is used) and my ResError in RB and even though GetResource
fails the calls after that don't and ResError ends up being 0.

Thanks.

On Tuesday, May 7, 2002, at 01:25 PM, Joseph J. Strout wrote:

> At 1:05 PM -0700 5/7/02, Will Leshner wrote:
>
>> Is there a way to tell when the ResourceFork's GetResource method
>> fails? GetResource returns a string. Apparently if there isn't enough
>> memory to get a resource, GetResource returns an empty string. But I
>> presume that a resource with nothing in it would also return an empty
>> string. I'd really like to know when my app is failing to get a
>> resource and raise an exception in that case.
>
> Try a declare to ResError.
>
> Best,
> - Joe
>
> -- ,------------------------------------------------------------------.
> | Joseph J. Strout REAL Software, Inc. |
> | <email address removed> http://www.realsoftware.com |
> `------------------------------------------------------------------'
>
> ---
> Subscribe to the digest: <mailto:realbasic-nug-
> <email address removed>>
> Unsubscribe:
> <mailto:<email address removed>>

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

Re: Detecting GetResource Failure
Date: 08.05.02 00:47 (Tue, 7 May 2002 17:47:11 -0600)
From: Norman Palardy
You could probably use a declare to access ResError

On Tuesday, May 7, 2002, at 02:05 PM, Will Leshner wrote:

> Is there a way to tell when the ResourceFork's GetResource method
> fails? GetResource returns a string. Apparently if there isn't enough
> memory to get a resource, GetResource returns an empty string. But I
> presume that a resource with nothing in it would also return an empty
> string. I'd really like to know when my app is failing to get a
> resource and raise an exception in that case.
>
> Any ideas?
>
> Thanks.
>
> ---
> Subscribe to the digest: <mailto:realbasic-nug-
> <email address removed>>
> Unsubscribe:
> <mailto:<email address removed>>

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