Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
46 user(s) are online (34 user(s) are browsing Forums)

Members: 1
Guests: 45

emeck, more...

Headlines

Forum Index


Board index » All Posts (tboeckel)




Re: Newstring.mcc a commodity????
Just popping in
Just popping in


Quote:
Hmm, doesn't appear in Exchange here.


It will appear only if it was used by at least one application before, i.e. IBrowse.

Quote:
Anyway, the devs could add an information text that displays when clicked on in Exchange, explaining that this is an interactive, system-used, non-user changable program.


I just commited the necessary change for the next MUI4 release. But this won't help for the old 68k version. That one must be patched on a binary level.

Go to top


Re: Newstring.mcc a commodity????
Just popping in
Just popping in


Quote:
I don't see how it can be considered a commodity as I cannot remove it from the system nor that I can disable it.
I thought this was the meaning of a commodity in the first place.


Newstring.mcc adds itself as a commodity broker only to be able to catch certain events from the input stream for its handling of i.e. RAmiga+C or RAmiga+V. Being a commodity makes this stuff really easy. But it does not react on the usual stuff like being killed or switched inactive, because there is only one single broker for all instances of Newstring.mcc no matter which application uses it.

Go to top


Re: MUI or Intuition : How to scroll a BitMap in a Window ?
Just popping in
Just popping in


Quote:
MUIA_FixWidth,width, MUIA_FixHeight,height,


Sorry, I wrote the stuff from memory and mixed up boolean values with real dimensions.

Quote:
screenshot ;)


My name is written with a simple "o", no french dressing on top of it ;)

Quote:
Therefore, now scrollbars work with BitmapObject even with subclassing, wonderful !!!


Now place the scrollbars in the window border, at least IIRC this was one of the wishes in the beginning. Add MUIA_Scrollgroup_UseWinBorder,TRUE to your Scrollgroup object and MUIA_Window_UseRightBorderScroller,TRUE and MUIA_Window_UseBottomBorderScroller,TRUE to your window object.


Go to top


Re: MUI or Intuition : How to scroll a BitMap in a Window ?
Just popping in
Just popping in


Quote:
ScrollBars appears but doesn't work with BitMapObject.


Enforce a fixed sized bitmap object using MUIA_FixWidth,TRUE and MUIA_FixHeight,TRUE.

Go to top


Re: MUI or Intuition : How to scroll a BitMap in a Window ?
Just popping in
Just popping in


Quote:
ChildIm_Data_full_bmp NewObject(mcc->mcc_Class,NULL,BitmapObject
                    
MUIA_Bitmap_Widthwidth,
                    
MUIA_Bitmap_Heightheight
                    
MUIA_Bitmap_Bitmapbitmap,TAG_DONE), 
End,


This cannot really work, because you are passing the result of a MUI_NewObject() call (inserted by the BitmapObject macro) as single tag without data to your own NewObject() call.

If your "mcc" variable is a subclass of Bitmap.mui, then the correct call must look like this:

ChildIm_Data_full_bmp NewObject(mcc->mcc_ClassNULL,
  
MUIA_Bitmap_Widthwidth,
  ...
  
TAG_DONE),


The same applies to a subclass of Dtpic.mui. You can pass all attributes directly to the NewObject() call.

Please note that the OM_NEW method of your own class must pass all attributes it receives to the DoSuperMethod() call via TAG_MORE. For reference take a look at YAM's source of its Shutdown window. It is a very simple class which consists of a constructor only. The inittags() macro looks like this:

#define inittags(msg) (((struct opSet *)msg)->ops_AttrList)


Quote:

1) why the scrollers failed to operate with my Bitmap (it fails with or without mcc_class) ?


This most probably fails because of the wrong object creation.

Quote:

2) if it possible to create a NewObject DtpicObject like that ?


No, see my explanation above.

Go to top


Re: MUI or Intuition : How to scroll a BitMap in a Window ?
Just popping in
Just popping in


Quote:
It shows the scrollbar but they are not effective...


Take the Virtual demo source as reference. The upper left virtual group does exactly what you want, except that it is showing a simple text instead of a bitmap.

Go to top


Re: MUI or Intuition : How to scroll a BitMap in a Window ?
Just popping in
Just popping in


Quote:
I hoped that I will be easier :(


It is easier, with MUI at least. Use something like this:

ChildScrollgroupObject
    
MUIA_Scrollgroup_UseWinBorderTRUE,
    
MUIA_Scrollgroup_ContentsVGroupV,
        
Child, <add your objects here...>
    
End,
End,


This should work in principle. I did not test this code, but wrote it just from memory right now.

Go to top


Re: IFACE for devices in a library
Just popping in
Just popping in


Quote:
Question is: why for timer IFACE is not necessary, but necessary for console.device.


Obtaining an interface is only necessary if you are calling one of the library functions of a device later. RawKeyConvert() is one of console.device's library functions. If you are using device IO only then obtaining the interface is not necessary.

As a thumb rule you must obtain the interface if there is something like this in the code (for m68k):

Quote:

// Get device base pointer
ConsoleDevice=console_req.io_Device;


For m68k the device base is the same as a library base to be able to call these functions. If you need to call timer.device functions like AddTime() or GetSysTime() then you must obtain the interface for timer.device, too.

Quote:

clipboard.device
trackdisk.device
diskspare.device
floppy.device
mfm.device


None of these devices offers any directly callable functions, only regular device IO via DoIO/SendIO/BeginIO is possible.

Go to top


Re: MUI: How to update bitmap class's bitmap or SourceColors
Just popping in
Just popping in


Quote:
I will try to copy Bitmap with

p96AllocBitMap
and
CompositeTags


A simple AllocBitMap + BltBitMap should suffice.

Go to top


Re: MUI: How to update bitmap class's bitmap or SourceColors
Just popping in
Just popping in


Quote:
I create the MUI_Bitmap by passing to it a Bitmap struct created by Datatype.


What happens to the DT object after you obtained the bitmap from it? Of course it must stay alive as long as the bitmap is used by your Bitmap object, because DisposeDTObject() will free all stuff belonging to the object, including the bitmap you obtained before. If you implemented things really this way, the you must clone the obtained bitmap before you dispose the DT object and use the cloned bitmap for your Bitmap object.

Go to top


Re: MUI: How to update bitmap class's bitmap or SourceColors
Just popping in
Just popping in


Quote:
Thank you by advance if you have a clue (even if you don't have...)


Well, there is nothing special in the log except that the crash is finally happening in rtg.library. How do you create the bitmap? Is it possible that it might become invalid when the application is iconified and hence invalid pointers will be accessed upon uniconification?

Go to top


Re: MUI: How to update bitmap class's bitmap or SourceColors
Just popping in
Just popping in


Quote:
I'm playing too with MUI Bitmap, contrary to you, I don't have problem to update my Bitmap but my program (and the OS) freezes when I deiconify my program.


A simple system freeze is not much of a basis to help you. Is there anything on the serial line?

Go to top


Re: MUI: How to update bitmap class's bitmap or SourceColors
Just popping in
Just popping in


Quote:

ChrisH wrote:
That's strange, because that's what eGame is doing at the moment, and it Works For Me (TM).

set(object, MUIA_Bitmap_Bitmap, newBitmap)


Most probably you didn't use MUIA_Bitmap_SourceColors then (or any other attribute which might cause the bitmap to be remapped). In this case setting a new bitmap will correctly redraw the new one. Otherwise you will also trigger a redraw event, but still with the old bitmap.

Quote:
For AROS's Zune I did have to kludge it to refresh, but I assumed this was a bug since MorphOS as well as OS4 when I do it. Here was my kludge (don't do this at home!) :
set(object, MUIA_ShowMe, MUI_FALSE)
set(object, MUIA_ShowMe, MUI_TRUE)


This is almost the same as removing and readding the bitmap object, but a little bit worse as this will effectively cause two refresh cycles instead of just one.

Quote:
@tboeckel
Any idea why it works for me? And why doesn't MUI act intelligently & refresh the bitmap when it is changed (in some circumstances anyway)?


I cannot really tell why stunzi implemented it this way. I guess it was done this way because usually people use the set() macro instead of SetAttrs() directly. The macro allows to modify one attribute with each call only. The point is that modifying the bitmap might require more than one attribute to be changed (mask, colors, etc). Setting all these attributes with single set() calls instead of one SetAttrs() call would have resulted in a redraw action for each set() call. And even worse it even might cause graphical garbage if the old mask is applied to the new bitmap.

Go to top


Re: LibNode check and iobsoletes
Just popping in
Just popping in


Quote:
#ifdef __amigaos4__
#define INTUITION_PRE_V36_NAMES
#include <intuition/iobsolete.h>
#endif


intuition/iobsolete.h is already included by several other include files, i.e. intuition/screens.h. Hence most probably it has been included already at the time you do it explicitly and therefore your own definition of INTUITION_PRE_V36_NAMES comes a bit too late. Better add -DINTUITION_PRE_V36_NAMES to the CFLAGS definition in your Makefile to make sure that the symbol is always defined.

Go to top


Re: LibNode check and some ioobsoletes
Just popping in
Just popping in


Quote:
They all in the intuition/iobsolete.h , but including such a file didn't help. I also tryed to set #define INTUITION_PRE_V36_NAMES , as well as use-D__INTUITION_PRE_V36_NAMES__ : no luck. Is there another switch or the only way is to copy+paste defines to code ?


The symbol must be named "INTUITION_PRE_V36_NAMES" and not "__INTUITION_PRE_V36_NAMES__". And you must define it before including intuition/iobsoletes.h.

Go to top


Re: MUI: How to update bitmap class's bitmap or SourceColors
Just popping in
Just popping in


Quote:
I wish that was documented somewhere though! I could find nothing about this anywhere!


I just added a short note the Autodocs of Bitmap.mui.

Go to top


Re: MUI: How to update bitmap class's bitmap or SourceColors
Just popping in
Just popping in


You will have to take a little detour to enforce the necessary relayout of the bitmap object. Take this object definition for example:

grp HGroup,
  
Childbm BitmapObject
    
MUIA_Bitmap_Bitmapinitialbitmap,
    ...
  
End,
End;


To set a new bitmap do this:
if(DoMethod(grpMUIM_Group_InitChange))
{
  
DoMethod(grpOM_REMMEMBERbm);
  
SetAttrs(bmMUIA_Bitmap_Bitmapnewbitmap, ..., TAG_DONE);
  
DoMethod(grpOM_ADDMEMBERbm);
  
DoMethod(grpMUIM_Group_ExitChange);
}


The relayout is enforced by removing and readding the bitmap object.

Go to top


Re: Sylpheed stealing e-mail
Just popping in
Just popping in


googlemail has a mode called "recent mode". Using this mode will leave the mails on the server for at least 30 days.

Refer to this page for details.

Go to top


Re: MUI : How to update image filename of a DTPic when running ?
Just popping in
Just popping in


Quote:
If this is true, then DTPic might internally keep the pointer to the file name and if you set the same pointer a second time, it thinks the image didn't change and thus doesn't update the display.


That's true. Dtpic.mui just remembers the string pointer passed to MUIA_Dtpic_Name and does NOT copy the string. Second, during OM_SET it will check if the pointer changes first. Third, NULL is no valid value for MUIA_Dtpic_Name.

Since the string pointer is remembered you must use a different buffer to change the image. Something like this will NOT work:

char buffer[64];
snprintf(buffer, sizeof(buffer), "%s/foo.png", path);
set(dtobj, MUIA_Dtpic_Name, buffer);
snprintf(buffer, sizeof(buffer), "%s/bar.png", path);
set(dtobj, MUIA_Dtpic_Name, buffer);

However, this will work:
char buffer1[64];
char buffer2[64];
snprintf(buffer1, sizeof(buffer1), "%s/foo.png", path);
set(dtobj, MUIA_Dtpic_Name, buffer1);
snprintf(buffer2, sizeof(buffer2), "%s/bar.png", path);
set(dtobj, MUIA_Dtpic_Name, buffer2);

I will add an appropriate comment to the attribute's Autodocs for the next release.

Go to top


Re: MUI : How to update image filename of a DTPic when running ?
Just popping in
Just popping in


Quote:
I find a related question :
http://amigans.net/index.php?function=viewcomments&threadid=124

Is it implemented in MUI39 ?


The link you provided already proves that this stuff is implemented since 2 years now.

Changing the image of a Dtpic object definitely works, I just checked it myself with both MUI 3.9 and MUI 4.0. I took the Class1 demo source and just added these few lines:

within the window creation:Quote:

Child, img=DtpicObject, MUIA_Dtpic_Name, "ram:img1.png", End,
Child, b1=KeyButton("Image 1", '1'),
Child, b2=KeyButton("Image 2", '2'),


after the window creation:Quote:

DoMethod(b1, MUIM_Notify, MUIA_Pressed, FALSE, img, 3, MUIM_Set, MUIA_Dtpic_Name, "ram:img1.png");
DoMethod(b2, MUIM_Notify, MUIA_Pressed, FALSE, img, 3, MUIM_Set, MUIA_Dtpic_Name, "ram:img2.png");


Go to top



TopTop
« 1 2 3 4 (5) 6 7 8 ... 10 »




Powered by XOOPS 2.0 © 2001-2023 The XOOPS Project