Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
102 user(s) are online (61 user(s) are browsing Forums)

Members: 0
Guests: 102

more...

Headlines

Forum Index


Board index » All Posts (Gazelle)




Re: Gui4Cli : Bookmark structure manager for OWB, Netsurf and IBrowse
Just popping in
Just popping in


@Lio

As the addressbook of simplemail ist xml you can use XSLT to transform it into something else, eg. HTML:

<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:template match="/">
  <html>
  <body>
  <h2>Simplemail Addressbook</h2>
  <table border="1">
    <tr bgcolor="#9acd32">
      <th>Alias</th>
      <th>Name</th>
      <th>Emails</th>
      <th>Address (privat)</th>
      <th>Address (work)</th>
    </tr>
    <xsl:apply-templates/>
  </table>
  </body>
  </html>
</xsl:template>

<xsl:template match="newcontact">
  <tr>
    <td><xsl:value-of select="alias"/></td>
    <td><xsl:value-of select="name"/></td>
    <td>
      <xsl:for-each select="email">
        <xsl:value-of select="."/>
          <xsl:if test="not (position()=last())">
            <br />
          </xsl:if>
      </xsl:for-each>
    </td>
    <td><xsl:apply-templates select="private"/></td>
    <td><xsl:apply-templates select="work"/></td>
  </tr>
</xsl:template>

<xsl:template match="private|work">
  <xsl:if test="count(./*) &amp;gt; 0">
    <xsl:value-of select="street"/><br />
    <xsl:value-of select="zip"/><xsl:text> </xsl:text>
    <xsl:value-of select="city"/><br />
    <xsl:value-of select="country"/><br />
  </xsl:if>
</xsl:template>

</xsl:stylesheet>

Go to top


Re: Gui4Cli : Bookmark structure manager for OWB, Netsurf and IBrowse
Just popping in
Just popping in



Go to top


Re: Initial port of new Paint app. NEW VERSION #11
Just popping in
Just popping in


@kas1e

It was in Reaction. Sorry, no code available because I was using a gui builder to just put it together to make a screenshot and didn't save it.

Go to top


Re: Initial port of new Paint app. NEW VERSION #11
Just popping in
Just popping in


@kas1e
Quote:
That mean that no ASL will be used for Save?


I used the getfile class for DrawerName and FileName. If you press the button left of the string gadget you'll get an ASL Drawer/File requester.

Go to top


Re: Initial port of new Paint app. NEW VERSION #11
Just popping in
Just popping in


@kas1e

How about a save requester like that:

Resized Image

I forgot the Save and Cancel button, but you'll get the idea.

Top: Drawer, File and filetype gadgets
Bottom: options of selected filetype


Edited by Gazelle on 2010/7/9 20:43:04
Go to top


Re: How compile MUI based programms to AOS4 ?
Just popping in
Just popping in


@kas1e

Take a look at the Autodocs for MUI_Image.doc:

"3:<n>" where <n> is the name of an external boopsi image class.

I think you need this:

"5:<n>" where <n> is the name of an external picture file that should be loaded with datatypes. Kick 2.x users will get an empty image.

Go to top


Re: How compile MUI based programms to AOS4 ?
Just popping in
Just popping in


@kas1e

It's part of MUI but not documented, you need MUIUndoc from aminet.

Go to top


Re: GetText
Just popping in
Just popping in



Go to top


Re: Special OS4.1 Offer!!!!!!!
Just popping in
Just popping in



Go to top


Re: getting status of shift key
Just popping in
Just popping in


@orgin

But shouldn't the "InputEvent.ie_Qualifier" tell you what you want?

Go to top


Re: getting status of shift key
Just popping in
Just popping in


@orgin

Here is the code from the pdf ZeroG mentioned updated for input device:

struct MsgPort *InputMP;
struct IORequest *InputIO;
struct Library *InputBase;
struct InputIFace *IInput;
BOOL InputIO_used FALSE;

UWORD qualifier;


InputMP IExec->AllocSysObject(ASOT_PORTNULL);
if (!
InputMPcleanexit("Cannot create input message port");

InputIO IExec->AllocSysObjectTags(ASOT_IOREQUEST,
                                    
ASOIOR_Sizesizeof(struct IORequest),
                                    
ASOIOR_ReplyPortInputMP,
                                    
TAG_DONE);
if (!
InputIOcleanexit("Cannot allocate IORequest");

if (
IExec->OpenDevice(INPUTNAME0InputIO0))
    
cleanexit("cannot open input device");

InputBase = (struct Library *)InputIO->io_Device;
IInput = (struct InputIFace *)IExec->GetInterface(InputBase"main"1NULL);
if (!
IInputcleanexit("Cannot obtain input interface");

// ... call input functions, i.e.
qualifier IInput->PeekQualifier();

/* set this to true if you are using InputIO
InputIO_used = TRUE;
*/

if (InputIO_used)
{
    if (!
IExec->CheckIO(InputIO))
        
IExec->AbortIO(InputIO);

    
IExec->WaitIO(InputIO);
}
IExec->DropInterface((struct Interface *)IInput);
IExec->CloseDevice(InputIO);
IExec->FreeSysObject(ASOT_IOREQUESTInputIO);
IExec->FreeSysObject(ASOT_PORTInputMP);


/edit: updated InputIO handling


Edited by Gazelle on 2009/4/18 14:59:57
Go to top


Re: getting status of shift key
Just popping in
Just popping in


@orgin

A quick scan trough the autodocs:

qualifier = IInput->PeekQualifier();
or
key = ILowLevel->GetKey();

see input.doc or lowlevel.doc

Go to top


Re: Reaction Macro party thread
Just popping in
Just popping in


@orgin

Looks good, keep it coming :)

Just an information: LM_ADDCHILD is V53 -> Amiga OS4.1

BTW: Have you considered using application.library/prefsobjects/-prefsobjects- for your configuration?

Go to top


Re: Reaction Macro party thread
Just popping in
Just popping in


@orgin

Quote:
Using LM_ADDCHILD doesn't do anything at all. But then again, I'm probably using it the wrong way.

This is what I tested:

IIntuition->RefreshSetGadgetAttrs(mommy, NULL or window, NULL, LM_ADDCHILD, child,TAG_DONE);


LM_ADDCHILD is a method of the layout.gadget, not a TAG or macro, see layout_gc.doc:
NAME
    LM_ADDCHILD 
-- Add gadget to active layout. (V53)

    
SYNOPSIS
    uint32 result 
IDoMethodA(APTR objstruct lmAddChild msg);


Quote:
How do I refresh the window after adding some gadgets to it?


If you are using the window.class, see window_cl.doc:

NAME
    WM_RETHINK 
-- Rethink an open window layout limits.

    
SYNOPSIS
    uint32 result 
IDoMethodA(APTR objMsg msg);

Go to top


Re: New windows bar docky, from OpenAmiga
Just popping in
Just popping in


@orgin

I don't think so. An AppWindow doesn't need to have an AppIcon (and vice versa). Also not every program does have an AppIcon.

In eg. Simplemail you can choose when you want to have an AppIcon: Never, Iconified or Always. And it changes its AppIcon depending on the state and emails. This is done with removing the old AppIcon and add a new one.

Go to top


Re: Check existence of assign
Just popping in
Just popping in


@thomas

And since OS4 there is
APTR oldvalue IDOS->SetProcWindow( -1L );
/* do something without error requester from DOS */
...
IDOS->SetProcWindowoldvalue );

Go to top


Re: Application library event handling
Just popping in
Just popping in


@orgin

You should also handle AMTYPE_APPWINDOW type Messages. Don't know why you only get AMTYPE_APPICON but as I understand the autodoc you should receive one type for your AppIcon and the other for your AppWindow.

Go to top


Re: Application library event handling
Just popping in
Just popping in


@orgin

Are you sure you're not mixing application.library and workbench.library?

An AppWindow has nothing to do with the application.library. It's from workbench, see AutoDoc for workbench.library/AddAppWindowA

The AppMessage is defined in workbench/workbench.h

If you have two ports, each port will have it's own signal. You get the mask for every port and than wait for the signals.

app_mask 1UL << AppPort->mp_SigBit;
win_mask 1UL << WinPort->mp_SigBit;

do
{
   
signals Wait(app_mask win_mask)

   if (
signals app_mask)
   {
       
/* handle messages from AppPort */
   
}

   if (
signals win_mask)
   {
       
/* handle messages from WinPort */
   
}

}
while (!
done);

Go to top


Re: Subscribing to file system notifications
Just popping in
Just popping in


@orgin

Quote:
Am I supposed to use the ((struct NotifyRequest *)ptr)->nr_stuff.nr_Msg.nr_Port instead of the supplied port to receive messages? (why then supply a port to AllocDosObjectTags() if it's supplying me with a new port anyway?)


As I understand it, it's the "same" port you supply with AllocDosObjectTags().


Quote:
How do I query the message port for something else than struct Message * ? (IExec->GetMsg() returns struct Message *, not struct NotifyMessage* or can you safely typecast it)


If you use the Port only for your filenotification it should be save to typecast it, or not?

FSMsgPort IExec->CreateMsgPort();

if(
FSMsgPort)
{
  
ULONG notify_mask 1UL << FSMsgPort->mp_SigBit;
  
APTR ptr IDOS->AllocDosObjectTags(DOS_NOTIFYREQUEST,
                                      
ADO_NotifyName, (STRPTR)"my:path"
                                      
ADO_NotifyMethodNRF_SEND_MESSAGE,
                                      
ADO_NotifyPortFSMsgPort,
                                      
ADO_NotifyUserDatamyuserdata,
                                      
TAG_DONE);

  if (
ptr)
  {
    if (
IDOS->StartNotify(ptr))
    {
      
ULONG signals;
      
BOOL done FALSE;
      
struct NotifyMessage *msg;

      do
      {
        
signals IExec->Wait(SIGBREAKF_CTRL_C notify_mask)

        if (
signals notify_mask)
        {
          while( (
msg = (struct NotifyMessage *)IExec->GetMsg(FSMsgPort)) ) 
          {
            if (
msg->nm_Class == NOTIFY_CLASS && msg->nm_Code == NOTIFY_CODE)
            {
              
/* do something */
              // msg->nm_NReq->nr_Name
              // msg->nm_NReq->nr_UserData
            
}
            
IExec->ReplyMsg((struct Message *)msg);
          }
        }

        if (
signals SIGBREAKF_CTRL_Cdone TRUE;
      }
      while( !
done );

      
IDOS->EndNotify(ptr);
    }
    
IDOS->FreeDosObject(DOS_NOTIFYREQUESTptr);
  }
  
IExec->DeleteMsgPort(FSMsgPort);
}

Go to top


Re: GCC, Dynamic structure creation method ?
Just popping in
Just popping in


@freddix

You need a basic C tutorial. I don't think you have understood the structure and pointer thing.

If you define a common structure you don't use "typedef" you just define the structure before the code:
/* first define */

struct MyStruct {
   
int member1;
   
int member2;
};

/* define global vars */
struct MyStruct IamGlobalMyStruct;

/* now code */
void MyFunction(void) {
   
struct MyStruct IamMyStruct;
   
struct MyStruct *IamPointingToMyStruct;

   
IamPointingToMyStruct = &IamMyStruct;

   
/* now you can access  members of IamMyStruct with "."
      and IamPointingToMyStruct with "->" */

}


And that's all I'll say to this topic.

Go to top



TopTop
« 1 2 3 (4) 5 6 »




Powered by XOOPS 2.0 © 2001-2023 The XOOPS Project