Announcement

Collapse
No announcement yet.

CONTROL SET/GET USER statements

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Marc Giao
    replied
    Should look as follows:
    Attached Files

    Leave a comment:


  • Stuart McLachlan
    replied
    Originally posted by Marc Giao View Post
    Look to the left, the "Contents" tab, twelfth item down.
    You mean the "Flash inside another Flash" left hand panel that my Firefox "FlashBlock" add-on just shows as a blank - not even an icon to show that there would be more content there if I activated the top Flash menu?

    Grrrrr!

    Leave a comment:


  • Marc Giao
    replied
    Hi Stuart,

    Wrong list

    Look to the left, the "Contents" tab, twelfth item down.

    Leave a comment:


  • Stuart McLachlan
    replied
    Originally posted by Marc Giao View Post
    See "Error and Error Trapping/Error Overview" on the link provided for more details.
    I don't see that on the link provided - all I see are the following links,
    %-W buttons and:
    Introducing PowerBASIC For Windows
    New Statements and Functions
    Command Summary
    Running PB/Win
    Data Types
    Built-in numeric equates
    Built-in string equates
    Glossary
    Register
    Technical Support
    Downloads
    Peer Support Forums

    Leave a comment:


  • Michael Mattias
    replied
    little speed here, a little speed there, .... Pretty soon we'll have #Mommy On all the time.
    The solution to that is pretty obvious... after debugging, you just set #MOMMY OFF and recompile!

    Leave a comment:


  • Marc Giao
    replied
    Since we're talking errors, I assume Mr. Zale is refering to the following:

    Error Overview
    Unlike the DOS versions of PowerBASIC, Windows versions of PowerBASIC employ a completely different philosophy: to generate the smallest and fastest possible code. Consequently, error handling is placed firmly in the hands of the programmer. PowerBASIC does not stop your program when a run-time error occurs. It is responsibility of the programmer to check for any conceivable errors that may occur after executing a statement...
    See "Error and Error Trapping/Error Overview" on the link provided for more details.

    Leave a comment:


  • Gösta H. Lovgren-2
    replied
    In case you had not guessed, I would happily sacrifice a little runtime speed in exchange for better error handling in these cases.
    A little speed here, a little speed there, .... Pretty soon we'll have #Mommy On all the time.

    =================================================
    "A newspaper is a collection of half-injustices"
    =================================================

    Leave a comment:


  • Jim McLachlan
    replied
    Hi Bob, thanks for checking in and posting.

    However, your post was a little cryptic, and perhaps also a bit sarcastic

    It contained a link to PB9. Was your intent to indicate that PB9 traps this condition whereas PB8 did not?

    Leave a comment:


  • Michael Mattias
    replied
    In summary the philosophy is implemented as , "If we set the system ERR variable in response to an invalid parameter being passed to an intrinsic function, it's news to us, too. For the most part, such actions will get you undefined results with equally undefineable consequences... either some of the time or most of the time."

    In case you had not guessed, I would happily sacrifice a little runtime speed in exchange for better error handling in these cases.

    But I was not in the room when that decision was made.

    Leave a comment:


  • Stuart McLachlan
    replied
    Where on that page would I find "PowerBASIC Philosophy on Run-Time exceptions..." ?

    Leave a comment:


  • Bob Zale
    replied
    PowerBASIC Philosophy on Run-Time exceptions...

    http://www.powerbasic.com/support/help/pbwin/index.htm

    Leave a comment:


  • Jim McLachlan
    replied
    Originally posted by Bob Zale View Post
    Jordi --

    Please do not use more than 8 32-bit data items. If you use more, you are overwriting other data which will eventually cause serious, but unpredictable results.

    Bob Zale
    PowerBASIC Inc.
    I am puzzled why, if PB only wants you to use a maximum of eight 32-bit data items, it would allow you to use more. I've never written a compiler before but I would hope it could trap any number over 8 that is sent to a CONTROL/DIALOG GET/SET USER command.

    Leave a comment:


  • Michael Mattias
    replied
    Sorry about using an acronym; NFS in this context means "New Feature Suggestion."

    You send those to the PBPTB.

    MCM

    Leave a comment:


  • Jordi Vallès
    replied
    Sounds a good alternative, and probably faster. Thanks Michael.

    A question, what NFS means ? The FreeDictionary on Google has 43 different acronyms for this, from Network File System to Not for Sale, or perhaps means
    Not Fully Specified ? I'm not very fond of acronyms.

    Jordi

    Leave a comment:


  • Michael Mattias
    replied
    >But it's nice to imagine more of eight user areas.

    Code:
    TYPE UserAreaType
       UserArea (1 TO  many many many) AS LONG 
    END TYPE
    
      LOCAL pUA AS UserAreaType PTR,  hMem AS LONG 
      GLOBALMEM ALLOC SIZEOF(@pUA) TO hMem
      GLOBALMEM LOCK hMem to pUA 
      FOR Z = 1 To Many many many 
          @pUA.UserArea(Z) = my value 
      NEXT
      GLOBALMEM UNLOCK  hMem
      CONTROL SET USER   CBHNDL,%ID_CONTROL, 1, hMem
    ....

    (I had submitted a NFS for ONE (1) such setting. I got eight. I was happy).

    MCM
    Last edited by Michael Mattias; 3 Nov 2009, 02:42 PM.

    Leave a comment:


  • Jordi Vallès
    replied
    Ok Bob. Is what I supposed. But it's nice to imagine more of eight user areas.
    Thanks

    Leave a comment:


  • Bob Zale
    replied
    Jordi --

    Please do not use more than 8 32-bit data items. If you use more, you are overwriting other data which will eventually cause serious, but unpredictable results.

    Bob Zale
    PowerBASIC Inc.

    Leave a comment:


  • Jordi Vallès
    started a topic CONTROL SET/GET USER statements

    CONTROL SET/GET USER statements

    In my programs, if ownerdrawn controls are present, I use extensively the sentences CONTROL SET/GET USER due that allows some kind of communication between normal program and ownerdraw routines during normal execution.

    PB documentation says:
    Code:
    CONTROL SET USER ...    or    CONTROL GET USER ...
    . . .
    [I]index&[/I] is the index number of the user data value to set/retrieve, 
    in the range 1 to 8 inclusive.
    Due to type errors in my last program I used 11 to 18 instead of 1 to 8 and the program is compiled without errors and works as expected. I realized some tests and seems that this sentences accepts up to 23 user data areas per control.

    My question is this behavior not documented is a problem or maybe is an expansion for future versions and I can use more that 8 possible user data areas ? Would be fantastic for me because I need up to 10 user areas in one of my current projects.

    Jordi
Working...
X