Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
19 user(s) are online (16 user(s) are browsing Forums)

Members: 0
Guests: 19

more...

Support us!

Headlines

Forum Index


Board index » All Posts (broadblues)




Re: boopsi: how to make button with 2 lines with centered text in ?
Home away from home
Home away from home


Put the justification before the text.

Use a similar label with alternate colours for the select image.

Go to top


Re: Correct way to work with RGB/ARGB bitmaps?
Home away from home
Home away from home


You called the first render() before you created the bitmapobjet if that code is right.

But other wise next render you delete the bitmap whilst attached to the bitmapobject, that wont go down well.

Go to top


Re: texteditor.gadget and copy/paste
Home away from home
Home away from home


@kas1e

Quote:

Any ideas on properly loading large binary files (more than 100mb) into texteditor.gadget? Issue is that null bytes (0x00) get treated as string terminators, so content gets truncated. Notepad and MultiEdit seem to handle this: they not only skip 0x00 but also appear to skip something else too, and that no isprint() from ctype.h.


1. You probably shouldn't as it's a text editor

but

2. JUst use

SetAttrs((Object *)EditorGadget,
GA_TEXTEDITOR_Length,Size,
GA_TEXTEDITOR_Contents,Data,
TAG_DONE);

Go to top


Re: texteditor.gadget and copy/paste
Home away from home
Home away from home


With window class windows you need to add a idcmphook, WINDOW_IDCMPHook or similar (away from any amiga to check) search window class auto doc.

You might need to set the gadgets ICA_TARGET to the window, check includes for correct values, should be obvious

Go to top


Re: texteditor.gadget and copy/paste
Home away from home
Home away from home


@kas1e

No the issue is that your code always sets the scroller to the gader position, but never does the reverse. So when the gadget changes due to text input or cursor keys, the scroller updates, but the scroller is dragged, the code immediate outs back to the current gadget state.

You need to listen to both gadget changes and apply to scroller and scroller changes and apply to gadget. Both via OM_NOTIFY

WMHI_INTUITICK will triggering at least 10 times a second, you only want updates when things change.

Go to top


Re: texteditor.gadget and copy/paste
Home away from home
Home away from home


@kas1e

No listen to OM_Notify and check for the GA_Texteditor_Prop attributes. Im away so cant give any example code.

Go to top


Re: texteditor.gadget and copy/paste
Home away from home
Home away from home


@kas1e,

Visibility in what sense?

I'm guessing you dont mean GA_Hidden as hidden a text editor would make no sense at all.

Visible in scroller? The containing window is visible?

Go to top


Re: texteditor.gadget and copy/paste
Home away from home
Home away from home


@kas1eQuote:
kas1e wrote:@Andy
Thanks a bunch ! It helps and clear code a lot. I do use WMHI_INTUITICK already for control ghosting/unghosting states, but with window active is still not that clear. We don't have LayoutActivateGadget, and LM_ACTIVATEGADGET (WM one instead) but you probably mean something like :


Er we do except that its ActivateLayoutGadget() but I the got OS dependency the wrong way round and you should indeed use the WM_ACTIVATEGADGET.
Quote:

// Check if another gadget is active in the top-level layout
                            
struct Gadget *layoutGadget = (struct Gadget *)resizableLayout;
                            if (!(
layoutGadget->Activation GACT_ACTIVEGADGET))
                            {
                                
// Activate the text editor gadget using the layout
                                
IIntuition->IDoMethod(resizableLayoutWM_ACTIVATEGADGET,
                                    (
struct Gadget *)textEditorwindowNULL);
                            }


?

This one didn't work, but this one works:

Well it wouldn't you just applied the WM_ACTIVATEGADGET to a layooutgadget, should be the window class object! Also the method structure takes just ME=ethodID and gadget so that should be:

IDoMethod(WindowObject,(struct Gadget *)textEditor);
Quote:


[quote]
// Check if mouse is over the text editor gadget
                        
if (mouseX >= editorLeft && mouseX editorTop && mouseY Activation GACT_ACTIVEGADGET))
                            {
                                
// Activate the text editor gadget directly
                                
IIntuition->ActivateGadget((struct Gadget *)textEditorwindowNULL);
                            }
                        }




You *should* use the WM_METHOD and not Activate gadget directly, as the active gadget in a window.class window is the layout not the any of it's children( the layout passes on events to the texteditor or whichever gadget it thinks is active)

If you do that then the texteditor should remain active after resizing the window.

Quote:

Anyway, that help only when the mouse over the texteditor , but texteditor not start to be active not after resize of window (because mouse not over it), not after i simple drag window (while it still active), not when i click on the toolbar gadget (but not toolbar buttons), and not when i simple iconify/deiconify, etc. I need it to react like this : if window is active , then texteditor gadget is active and cursor stays.

Same goes to cut/copy/paste : after it texteditor not active if i use toolbar buttons or menu when mouse outside of text editor.

So, thank you for idea with WHMI_INTUITICK, i make it as i want by this:

case WMHI_ACTIVE:
                    
// Set flag when window becomes active
                    
windowActive TRUE;
                    break;

                case 
WMHI_INTUITICK:
                    
// Activate text editor if the window is active and no other gadget is active
                    
if (window && windowActive)
                    {
                        
// Check if another gadget is active in the top-level layout
                        
struct Gadget *layoutGadget = (struct Gadget *)resizableLayout;
                        if (!(
layoutGadget->Activation GACT_ACTIVEGADGET))
                        {
                            
// Activate the text editor gadget directly
                            
IIntuition->ActivateGadget((struct Gadget *)textEditorwindowNULL);
                        }
                    }
                    break;


Then it works as expected ! Yahoo !

Go to top


Re: texteditor.gadget and copy/paste
Home away from home
Home away from home


@kas1e

Quote:

Is there a straightforward way to ensure the editor window remains active


Use a method like WMHI_INTUITICK to poll the Window->MouseX amd MouseY values then when the mouse id over the editgadget activate it with LayoutActivateGadget() (on OS4)

Check that another gadget is not active at the time by testing the toplevel layout

ie
if(!
((
struct Gadget *)layout) -> Activation GACT_ACTIVATEGADGET))
{
LayoutActivateGaget(layout,Window,editorgadget);
}


This stops you continuosly activateing the gadget and also stop it from steel foxus from another activated gadget just because the mouse moved over the editor,

Go to top


Re: texteditor.gadget and copy/paste
Home away from home
Home away from home


@kas1e

For scroller use GA_TextEdit_Prop_#? to get the top visible and total entries and use these to apply the equivalent SCROLLER attributes.

Go to top


Re: texteditor.gadget and copy/paste
Home away from home
Home away from home


@kas1e

Use The ARexx interface.

1 & 3

BOOL Copy(struct Gadget *editorgad)
{
 
    
struct GP_TEXTEDITOR_ARexxCmd gptac = {0}; 
    if(
editorgad_ptr )
    {
        
gptac.MethodID GM_TEXTEDITOR_ARexxCmd;
        
gptac.command = (STRPTR)"COPY";
        if(
DoGadgetMethodA(editorgad,Window,NULL,(Msg)&gptac))
        {
            return 
TRUE// Copy succeded 
        
}
    }
    return 
FALSE;
}


2

/* Paste from clipboard */

BOOL Paste(struct Gadget *editorgad_ptr)
{
    
struct GP_TEXTEDITOR_ARexxCmd gptac = {0}; 

    if(
editorgad_ptr)
    {
        
gptac.MethodID GM_TEXTEDITOR_ARexxCmd;
        
gptac.command = (STRPTR)"PASTE";
        if(
DoGadgetMethodA(editorgad_ptr,Window,NULL,(Msg)&gptac))
        {
            
SetFileModified();
            return 
TRUE// Paste succeded 
        
}
    }
    return 
FALSE;
}


Both these methods cleanly handle the GUI updates and need no extra libs like TextClip

Go to top


Re: Ghosting a Reaction String Gadget
Home away from home
Home away from home


Some gadget's need to be refreshed before they update imagery after GA_Disabled.

In C code you might use

RefreshSetGadgetAttrs()

in proaction add the REFRESH arg to the SETATTRS call.

'SETATTRS GUIID ' || GuiKey || ' OBJECTID '|| TextStrField ||' TAGSTRING "GA_Disabled,0,TAG_DONE" REFRESH'

Go to top


Re: Get MAC Address od AmigaOS4 Machine
Home away from home
Home away from home


@nbache

Quote:

ShowNetStatus INTERFACE


Missed that option, oodles of info there!

Go to top


Re: Get MAC Address od AmigaOS4 Machine
Home away from home
Home away from home


@pjs

Couldn't see a way to get the MAC address of the machine i'm on with that but ironically the ARP option gives me the MAC address of the X1000 on the SAM and the SAM on the X1000 via their IPs.

Go to top


Re: Get MAC Address od AmigaOS4 Machine
Home away from home
Home away from home


@nbache

This variable is set for me but not the actual MAC address in use, probably its the address of the onboard ethernet and I am using an rtl8139 card.

Go to top


Re: Get MAC Address od AmigaOS4 Machine
Home away from home
Home away from home


@joerg

Works for my SAM thanks.

Go to top


Re: Get MAC Address od AmigaOS4 Machine
Home away from home
Home away from home


Ah thanks for inspiration, don't have Sysmon but do have ranger, should have thought of that!

Go to top


Get MAC Address od AmigaOS4 Machine
Home away from home
Home away from home


Is there a way to find the MAC address of my active internet connection on my X1000 and SAM ?

My ISP Network has problems at the moment and in order to solve them I was asked to factory reset my router (though issue appears to be external and now waiting for OpenReach engineer :-/ )

I need the MAC addresses to setup fixed DHCP addresses for them. But they don't appear in the list on the Vodafone router (possibly because they are attached to my NetGear wireless bridge) Ordinary fixed IP does not work well with this router due to the mix of Wired and Wireless (maybe its just not a very good router )

Weirdly despite the router reset and the machimes having been turned off they still have the right IP , but at somepoint that will change.

[edits] Typos and subject

Go to top


Re: WebKit based browser initiative
Home away from home
Home away from home


@Futaura

Quote:

Additionally, everywhere that uses the new timer code needs to be checked to make sure no mistakes were made in any other instances.


I search through and couldn't see any other similar mistakes.

For information the effective time in the "far future" caused a lock up in the AROS timer.device due to a signed comparison in the queue of the event and unsigned comparison in the processing of queue events, which meant the first event in the queue never fires, so no events fired, bring the entire "machine" to halt. I described this bug in detail to the AROS bug tracker and deadwoood fixed it.

Go to top


Re: WA_PubScreenName not working with PPC build
Home away from home
Home away from home


@Hitman,

AS the 68k version opens the screen as expected it can't be a problem with your screen database, so I would check the scopes of the variables, passing the actual screen name to the tag.

Is a_pccScreenName valid an initialised when compiled for OS4?

Add some debugprintf etc to check.

Go to top



TopTop
(1) 2 3 4 ... 108 »




Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project