[futurebasic] Re: [FB] List Manager demo

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : February 2005 : Group Archive : Group : All Groups

From: Steve Crossman <steve@...>
Date: Sat, 5 Feb 2005 00:02:00 -0500
yes i am one of the privileged few to own TWM. hi Bernie !!
i didn't think to look there.

thanks Brian...

On Feb 4, 2005, at 11:47 PM, Brian Stevens wrote:

> Have you tried using TWM to generate a list? Bernie defined most of  
> the LM functions in an include and it works well for me. If you don't 
> have TWM, let me know and I'll send you some code backchannel (tends 
> to be too big to post except for very simple examples just due to the 
> number of Toolbox defs that need to be included).
>
> Brian
>
>
> On Feb 4, 2005, at 9:03 PM, Steve Crossman wrote:
>
>> The example ' simple list in Carbon ' in the Carbon Controls folder 
>> is probably the better solution for OS X but  I cannot capture the 
>> cells I am clicking on, or able to update, delete, extract or add 
>> cells, similar to what can be done in older List Mgr Demo
>>
>> I don't seem to be getting the list rect, and thus the cell within 
>> that is being clicked on.
>>
>> Are there other examples or refinements of using a carbon list ?
>>
>>
>> ~ steve
>>
>> On Feb 4, 2005, at 9:53 PM, Steve Crossman wrote:
>>
>>> On the last FB4 CD there is in the _FB4 Examples : Lists : List Mgr 
>>> Demo Folder an example of using List Manager, originally by Ross 
>>> Lambert and updated  by Alain and STAZ in 2002
>>>
>>> This example from it below, shows loading an STR# resource into the 
>>> list in a packed string array format in the data pointer dPtr&
>>>
>>> How can this example be modified to place data from an Index$ array 
>>> into the list?
>>>
>>> I am missing something, as I end up with nothing, garbage or it 
>>> crashes.
>>> Is the locking and unlocking of the handles even needed in OS X ?
>>>
>>> Also the columns could not be increased beyond 1 with garbage 
>>> appearing.
>>>
>>> tia
>>>
>>> Steve
>>> ====================================
>>>
>>> ' Set up list data and flags
>>> gListH = _nil
>>> resH   = Fn GetResource( _"STR#", _listSTR )' source of list text
>>> Long If resH
>>> LoadResource( resH )'not required, but...
>>> Long If Fn ResError = _noErr
>>> HLockHi( resH ) ' lock the STR# handle
>>> dataPtr   = @resH..2` ' ptr to strings is 2 bytes in
>>> rows      = resH..nil% ' cnt in 1st two bytes of STR#
>>> cols      = 1 ' just want a single column list
>>> lFlags    = _lDoHAutoScroll%+_lDoVAutoScroll%' autoscroll on
>>> sFlags    = _lOnlyOne% ' single cell selection
>>> r.top     = 10 ' list rect
>>> r.left    = 20
>>> r.bottom  = 234
>>> r.right   = 180
>>>
>>> ' build the list and store the list handle
>>> gListH = Fn doNewList( r, _False, _ZTrue, cols, rows, lFlags, 
>>> sFlags, dataPtr )
>>> HUnlock( resH ) ' let go of STR#
>>> End If
>>> ReleaseResource( resH )
>>> End If
>>> End Fn
>>>
>>> --
>>>
>>
>> --
>>
>
> --
>