Login
Username:

Password:

Remember me



Lost Password?

Register now!
Main Menu
Who is Online
11 user(s) are online (8 user(s) are browsing Forum)

Members: 0
Guests: 11

more...


Browsing this Thread:   1 Anonymous Users




« 1 (2) 3 »


Re: MUI list behavior
#11
Home away from home
Home away from home


See User information
Hi,

Fun !

Resized Image


Resized Image


Intended ?

program DoubleOrNothing;

Uses
  Exec
AmigaDOSIntuitionMUIUtilityCHelpersSugarTrinity;

Const
  
N1 Esc_B 'AROS Windows Hosted 2015-08-13'   Esc_N;
  
N2 Esc_B 'Amiga Workbench 40.42 + MUI 3.8'  Esc_N;
  
L1 N1 '  : ';
  
L2 N2 ' : ';

Var
  
DefaultList   : array[0..22of PChar =
  (
    
'#',' ..... welcome into the magical emporium .....''#',
    
L1 'Could you check the attached executable for me ' N2 ' ?' #10,
    
L2 'Sure, what should i be lookin'' for ' N1 ' ?' #10,
    
L1 'Nothing special, just tell me if you can spot something out of the ordinary' #10, 
    
L2 'Well... i can''t say i see something wrong with it' #10,
    
L2 'Just some listview with some odd conversation listed' #10,
    
L1 'So, nothing wrong as far as you are concerned ?' #10,
    
L2 'Nope. Sorry.' #10,
    
L1 'That''s strange' #10,
    
L1 'Maybe i just need new glasses' #10,
    
L2 'Howcome ?' #10,
    
L1 'I see empty lines' #10,
    
L2 'Did you implemented a FLD routine then ?' #10,
    
L1 'hehe, no. And in that case, you should be able to see them as well ?' #10,
    
L2 'Hmz, you got a point there' #10,
    
L2 'Maybe you are just a bad coder ?' #10,
    
L1 'Yeah, that would probably clarify it. Thanks for helping me understand mate' #10,
    
'#',' ..... see you next time on the discovery channel .....''#',
    
nil
  
);

Var
  
AppWinListview      pObject_;

function 
BuildApplicationboolean;
begin
  App 
:= MUI_NewObject (MUIC_Application,
  [
    
TAG_(MUIA_Application_Title)            , TAG_(PChar('DoubleOrNothing')),
    
TAG_(MUIA_Application_Window)           , TAG_(SetAndGet(WinMUI_NewObject (MUIC_Window,
    [
      
TAG_(MUIA_Window_Title)               , TAG_(PChar('DoubleOrNothing')),
      
TAG_(MUIA_Window_RootObject)          , TAG_(MUI_NewObject (MUIC_Group,
      [
        
TAG_(MUIA_Group_Child)              , TAG_(SetAndGet(ListviewMUI_NewObject (MUIC_Listview,
        [
          
TAG_(MUIA_Listview_List)          , TAG_(MUI_NewObject (MUIC_List,
          [
            
TAG_(MUIA_List_SourceArray)     , TAG_(@DefaultList),
            
TAG_(MUIA_Frame)                , TAG_(MUIV_Frame_ReadList),
            
TAG_END
          
])),
          
TAG_END
        
]))),
        
TAG_END
      
])),
      
TAG_END
    
]))),
    
TAG_END
  
]);

  
Result := (App <> nil);
end;

procedure SetNotifications;
begin
  DoMethod 
(WinMUIM_Notify
  [
    
TAG_(MUIA_Window_CloseRequest), TAG_(MUIV_EveryTime), TAG_(App), 
    
2TAG_(MUIM_Application_ReturnID), TAG_(MUIV_Application_ReturnID_Quit)
  ]);
end;

procedure MainLoop;
Var
  
signalsLONG;
begin
  SetAttrs
(Win, [ TAG_(MUIA_Window_Open), TAG_(True), TAG_END ]);
  
  while (
DoMethod Pointer(App), MUIM_Application_NewInput, [TAG_(@Signals)] ) <> LongWord(MUIV_Application_ReturnID_Quit)) do
  
begin
    
if (signals <> 0then
    begin
      signals 
:= Wait (signals or SIGBREAKF_CTRL_C);
      if ((
signals and SIGBREAKF_CTRL_C) <> 0then break;
    
end;
  
end;

  
SetAttrs (Win, [TAG_(MUIA_Window_Open), TAG_(FALSE), TAG_END]); 
end;

Function 
Maininteger;
begin
  
if BuildApplication then
  begin
    SetNotifications
;
    
MainLoop;
    
MUI_DisposeObject(App);
  
end;

  
result := 0;
End;

begin
  ExitCode 
:= Main;
end.

Posted on: 2015/8/29 8:40
 Top  Twitter  Facebook  Google Plus  Linkedin  Del.icio.us  Digg  Reddit  Mr. Wong 


Re: MUI list behavior
#10
Home away from home
Home away from home


See User information
Quote:
magorium wrote:
Correct. See also question in my first post.

MUIM_List_CreateImage() and MUIM_List_DestroyImage() marked as being for internal use only.

Posted on: 2015/8/29 8:35
 Top  Twitter  Facebook  Google Plus  Linkedin  Del.icio.us  Digg  Reddit  Mr. Wong 


Re: MUI list behavior
#9
Home away from home
Home away from home


See User information
Quote:

migario: the notification is not firing or is firing with wrong value?

It was not firing at all for me.

Posted on: 2015/8/15 6:35
 Top  Twitter  Facebook  Google Plus  Linkedin  Del.icio.us  Digg  Reddit  Mr. Wong 


Re: MUI list behavior
#8
Home away from home
Home away from home


See User information
Quote:

ncafferkey wrote:
Quote:

magorium wrote:
Quote:

Handling of MUIA_Listview_ClickColumn does seem to be broken since the recent List class changes, as can be seen in the List -> Multicolumn tab in Tests/Zune/Test.

It's at least broken in latest icaros desktop.


Correct. However, it was fixed in ABIv1 in SVN r50292 (2015-04-07), but is now broken again.


I will work on fixing this.

migario: the notification is not firing or is firing with wrong value?

Posted on: 2015/8/15 5:43
Krzysztof

"There is no such thing as software for free. If it is not the user who covers the cost of software creation with money, it is the developer who covers this cost with his own free time."

www.aros3d.org
www.twitter.com/ddeadwood
 Top  Twitter  Facebook  Google Plus  Linkedin  Del.icio.us  Digg  Reddit  Mr. Wong 


Re: MUI list behavior
#7
Home away from home
Home away from home


See User information
Quote:

Correct. However, it was fixed in ABIv1 in SVN r50292 (2015-04-07), but is now broken again.

Ah ok. Thank you for that as i didn't realize that.

Quote:

The docs for the CreateImage method state that it has to be used in the Setup method of your list, which implies that you need to create a List subclass.

Language semantics ? Differences in interpretation of what is written ?

It appears Stefan was aware of the difference between should and must (and also *must*) when he wrote the MUI documentation.

In the documentation you refer to, I was expecting to read the word must if it should have been must.

In my interpretation he meant to say: you really should subclass here, but hey if you want to do otherwise, have fun !
(As in a suggestion.with an exclamation mark to make the statement a bit more powerfull)

That's why i verified what was written and to make sure i understood the words being written. I am allowed to do as i do in my code on classic.

I understand this to be no guarantee that my code is correct, only that my code shows that the behavior differs (whether that's wanted or not).

Sub-classing would just hide the difference in behavior ?

I do understand the reason behind the suggestion to subclass there, as it is the only sane way to make sure your images get created and destroyed at the exact locations where these images should be created and destroyed.


Although i understand the following to be ridiculous (and i am not 100% sure it is the reason, but i did not get an answer to my question as of why, so i can only guess), it hopefully states my point further:
If the Zune list class, as currently implemented, can act so intelligent and 'preserves' resources automatically for me when the application iconifies (BTW: something that the MUI autodocs state i should do manually), then why does the implementation not automatically (re)create the images for me as well ? (when not sub-classing that is)

Please don't let the ridiculousness of the above statement throw you off.


I strongly believe in my point of view, not only because it appears to work on classic (and i still haven't heard it did not work on MorphOS), but also because current Zune implementation lets you add images with MUIM_List_CreateImage and the list class will happily accept and display the images. It also let's you happily use MUIM_List_DestroyImage, but only _as long as you don't iconfiy the application_.

Besides that, classic shows me that the obtained pointer of MUIM_List_CreateImage is valid during the whole duration of the program. Is that still the case if i would subclass the way as was suggested ?


Of course you are more then valid to point me to the MUI autodocs and tell me that i'm doing it wrong, but in that case it appears that we disagree on this matter

Quote:

It doesn't appear that you have done this.

Correct. See also question in my first post.

Posted on: 2015/8/15 4:29
 Top  Twitter  Facebook  Google Plus  Linkedin  Del.icio.us  Digg  Reddit  Mr. Wong 


Re: MUI list behavior
#6
Home away from home
Home away from home


See User information
Quote:

magorium wrote:
Quote:

Handling of MUIA_Listview_ClickColumn does seem to be broken since the recent List class changes, as can be seen in the List -> Multicolumn tab in Tests/Zune/Test.

It's at least broken in latest icaros desktop.


Correct. However, it was fixed in ABIv1 in SVN r50292 (2015-04-07), but is now broken again.

The docs for the CreateImage method state that it has to be used in the Setup method of your list, which implies that you need to create a List subclass. It doesn't appear that you have done this.

Posted on: 2015/8/15 2:32
 Top  Twitter  Facebook  Google Plus  Linkedin  Del.icio.us  Digg  Reddit  Mr. Wong 


Re: MUI list behavior
#5
Home away from home
Home away from home


See User information
Quote:

TBH, I can't understand why you can't get a screenshot of what's going wrong (even if it has to be from a digital camera rather than the screengrabber app).

It's not that i can't take any pictures, just that a crash window does not add anything useful to what i've already shown and that this board still does not let me add any pictures. Besides that, i was not at home.

Quote:

Handling of MUIA_Listview_ClickColumn does seem to be broken since the recent List class changes, as can be seen in the List -> Multicolumn tab in Tests/Zune/Test.

It's at least broken in latest icaros desktop.


But, in the case you think it will help


This picture shows my application running

Resized Image


This picture shows the application in iconified state, after i pressed the zoom button

Resized Image


This spicture is when i try to return the application from iconified state by pressing twice on the AppIcon from the workbench.

Resized Image


This is the crashlog it produced

intuition.decoroffsets titleobj 548menuobj 552winobj 556
[KRNException 0xC0000005SysBase 0x029503b0KernelBase 0x029510e8
[KRNProcess 0x029f9350 (CheckListView_5.i386-aros)
    
ContextFlags0x0001003F
    ESP
=0363cdf4  EBP=0363ce8c  EIP=0330ef91
    EAX
=00000000  EBX=032a3d00  ECX=032a3d00  EDX=00596200
    EDI
=03294d00  ESI=00000012  EFLAGS=00010246
*** Logged alert:
Program failed
Task 
0x029F9350 CheckListView_5.i386-aros
Error
0x80000002 Hardware bus fault/address error
PC   
0x0330EF91
Module muimaster
.library Segment 1 .text (0x0330CBC0Offset 0x000023D1
Function MUIMaster_17_MUI_Redraw (0x0330EF60Offset 0x00000031
CPU context
:
EAX=0x00000000  EBX=0x032A3D00  ECX=0x032A3D00  EDX=0x00596200
ESI
=0x00000012  EDI=0x03294D00  ESP=0x0363CDF4  EBP=0x0363CE8C
EIP
=0x0330EF91  ESP=0x0363CDF4  EFLAGS=0x00010246
CS
=001B  SS=0023  DS=0023
ES
=0023  FS=003B  GS=0000
Stack trace
:
0x033201B7 muimaster.library Function zune_text_draw 0x00000237
0x03336F94 muimaster
.library Segment 1 .text 0x0002A3D4
0x03338B28 muimaster
.library Function List__MUIM_Draw 0x00000258
0x0333B4D0 muimaster
.library Function List_Dispatcher 0x000002B0
0x0331F2F4 muimaster
.library Function metaDispatcher 0x00000024
0x0330F08C muimaster
.library Function MUIMaster_17_MUI_Redraw 0x0000012C
0x03330FA8 muimaster
.library Function Group__MUIM_Draw 0x000001C8
0x033355E9 muimaster
.library Function Group_Dispatcher 0x00000799
0x0331F2F4 muimaster
.library Function metaDispatcher 0x00000024
0x0330F08C muimaster
.library Function MUIMaster_17_MUI_Redraw 0x0000012C




The following material is from the same app as above but modified, where i don't display the images in the displayloop, but i do create the images on startup (like in previous app-version, just after the window has opened without any data in it) and remove the images with MUIM_List_DeleteImage just before the window closes (also like in the previous version). It I also added some extra output.

The first set of images is when i don't iconfiy my application -> no crash, can exit normally

This picture shows my application running

Resized Image



This picture show me exiting the application without problems

Resized Image




This set if images is more interesting and is made when i iconify the application (and note that i dont display the created images at all).


This picture shows my application running

Resized Image


This picture shows the application in iconified state, after i pressed the zoom button

Resized Image


This picture shows when i de-iconified my application. Note that it didn't crash (but that i also don't refer to the images in the displayloop here)

Resized Image


This picture show what happens when i try to exit my application

Resized Image


This is the craslog it produced.

intuition.decoroffsets titleobj 548menuobj 552winobj 556
[KRNException 0xC0000005SysBase 0x029503b0KernelBase 0x029510e8
[KRNProcess 0x029f60b0 (CheckListView_6.i386-aros)
    
ContextFlags0x0001003F
    ESP
=03621650  EBP=036217f8  EIP=03326630
    EAX
=00000000  EBX=032813cc  ECX=036217dc  EDX=0299d3b0
    EDI
=0362185c  ESI=032813b0  EFLAGS=00010246
*** Logged alert:
Program failed
Task 
0x029F60B0 CheckListView_6.i386-aros
Error
0x80000002 Hardware bus fault/address error
PC   
0x03326630
Module muimaster
.library Segment 1 .text (0x0330CBC0Offset 0x00019A70
Function Area_Dispatcher (0x03325440Offset 0x000011F0
CPU context
:
EAX=0x00000000  EBX=0x032813CC  ECX=0x036217DC  EDX=0x0299D3B0
ESI
=0x032813B0  EDI=0x0362185C  ESP=0x03621650  EBP=0x036217F8
EIP
=0x03326630  ESP=0x03621650  EFLAGS=0x00010246
CS
=001B  SS=0023  DS=0023
ES
=0023  FS=003B  GS=0000
Stack trace
:
0x0331F2F4 muimaster.library Function metaDispatcher 0x00000024
0x0331F2F4 muimaster
.library Function metaDispatcher 0x00000024
0x0333A4F6 muimaster
.library Function List__MUIM_DeleteImage 0x00000046
0x0333B8B0 muimaster
.library Function List_Dispatcher 0x00000690
0x0331F2F4 muimaster
.library Function metaDispatcher 0x00000024
0x03578B0B CheckListView_6
.i386-aros Function INTUITION_$$_DOMETHOD$POBJECT_$LONGWORD$array_of_const$$LONGWORD 0x000000BB
0x03556A26 CheckListView_6
.i386-aros Function P$CHECKLISTVIEW_6_$$_CHECKBOXES_REMOVEIMAGESFROMLIST 0x00000056
0x0355763C CheckListView_6
.i386-aros Function P$CHECKLISTVIEW_6_$$_MAIN_LOOP 0x0000015C
0x03557711 CheckListView_6
.i386-aros Function main 0x00000061
0x03555F3C CheckListView_6
.i386-aros Function _haltproc 0x00000000


Please feel free to let me know if more information or sources/executables/pictures or something else is needed.

Posted on: 2015/8/14 20:04
 Top  Twitter  Facebook  Google Plus  Linkedin  Del.icio.us  Digg  Reddit  Mr. Wong 


Re: MUI list behavior
#4
Home away from home
Home away from home


See User information
TBH, I can't understand why you can't get a screenshot of what's going wrong (even if it has to be from a digital camera rather than the screengrabber app).

Handling of MUIA_Listview_ClickColumn does seem to be broken since the recent List class changes, as can be seen in the List -> Multicolumn tab in Tests/Zune/Test.

Posted on: 2015/8/14 15:25
 Top  Twitter  Facebook  Google Plus  Linkedin  Del.icio.us  Digg  Reddit  Mr. Wong 


Re: MUI list behavior
#3
Home away from home
Home away from home


See User information
Hmz,

the code crashes, so i fear that a screen-shot won't be very helpful (as i already know what's happening).

But, you can check it yourself if that would help.

Link with source-code (pascal) and executables for AROS-i386 and Amiga m68k (020).

Every time you return the application from iconification, it seems the image pointers are being destroyed (or at least are not valid anymore as my list display hook crashes).

In a test app here, and if i remove the reference to the text-macro-pointer of the image in the list display hook, then things work ok, until i exit the application, in which case the application crashes when the subroutine CheckBoxes_RemoveImagesFromList() is being invoked, in particular when the meta dispatcher calls the list dispatcher and List_MUIM_DeleteImage is being called.

All encountered behavior seems to suggest the image-pointers were rendered invalid after returning from iconify state.

PS:
I forgot.

In the case you are spending time on this, could you perhaps also take a look at why the MUIA_Listview_ClickColumn attribute notification isn't firing with MUIV_TriggerValue when attached to a List Object ?

DoMethod (ThisListObjectMUIM_Notify
  [
    
MUIA_Listview_ClickColumnMUIV_TriggerValueThisApplicationObject
    
2MUIM_Application_ReturnIDList_Item_Click_ID,
    
TAG_END
  
]);


Works for classic, reported to work for MorphOS, not working for AROS.

Posted on: 2015/8/14 5:51

Edited by magorium on 2015/8/14 8:17:08
 Top  Twitter  Facebook  Google Plus  Linkedin  Del.icio.us  Digg  Reddit  Mr. Wong 


Re: MUI list behavior
#2
Home away from home
Home away from home


See User information
Can you paste a screen shot of what you describe?

Posted on: 2015/8/14 5:29
Krzysztof

"There is no such thing as software for free. If it is not the user who covers the cost of software creation with money, it is the developer who covers this cost with his own free time."

www.aros3d.org
www.twitter.com/ddeadwood
 Top  Twitter  Facebook  Google Plus  Linkedin  Del.icio.us  Digg  Reddit  Mr. Wong 




« 1 (2) 3 »



You can view topic.
You cannot start a new topic.
You cannot reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You cannot vote in polls.
You cannot attach files to posts.
You cannot post without approval.
You cannot use topic type.
You cannot use HTML syntax.
You cannot use signature.
You cannot create PDF files.
You cannot get print page.

[Advanced Search]


Search
Top Posters
1 paolone
paolone
4462
2 nikolaos
nikolaos
4206
3 magorium
magorium
4095
4 phoenixkonsole
phoenixkonsole
3942
5 deadwood
deadwood
2917
6 ncafferkey
ncafferkey
2810
7 mazze
mazze
2222
8 Kalamatee
Kalamatee
2212
9 clusteruk
clusteruk
2114
Powered by XOOPS © 2001-2025 The XOOPS Project