<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
Hi Olaf,
<p>Not sure how I missed that in the documentation/source code!
<br>Thanks very much it works perfectly with both char and const char.
<p>Regards
<p>Matt
<p>Olaf Matthes wrote:
<blockquote TYPE=CITE>Hi Matthew,
<p>in case your fuction gets the hostname as 't_symbol *s', the code would
<br>look like this:
<p>char *host = s->s_name;
<p>I'm not shure if this would work with 'const char'...,
<br>In case you pass it a list (t_symbol *s, int argc, t_atom, argv):
<p>char *host = atom_getsymbolarg(i, argc, argv); /* with i = 0 to get
the
<br>first element in the list */
<p>Olaf
<p>PS: you can send me your code off the list and I'll have a look at it
<p>Matthew Paradis schrieb:
<p>> Hi,
<br>>
<br>> I am currently trying to port a number of my jMax externals to pd.
I'm
<br>> having a problem when setting up some of my network objects which
take
<br>> as object arguments the host name followed by the port number. For
<br>> example [socksenddgs localhost 6537].
<br>> I need to assign this argument to a const char, however it will not
<br>> allow me to initialise the variable.
<br>> In jMax it works in the following way;
<br>>
<br>> const char *host;
<br>> int port;
<br>> socksenddgs_t *this = (socksenddgs_t *)o;
<br>> this->sockfd = -1;
<br>> host = fts_symbol_name(fts_get_symbol_arg( ac, at, 1,0));
<br>> port = fts_get_int_arg( ac, at, 2, 0);
<br>>
<br>> Any ideas or examples of converting string type arguments from the
<br>> object would be much appreciated
<br>>
<br>> Matt
<br>>
<br>> --
<br>>
<br>> Matthew Paradis
<br>> University of York
<br>> Music Department
<br>> Heslington,
<br>> York,
<br>> YO10 5DD,
<br>> UK
<br>> Tel: 0044-1904-43-2435
<br>> mdjp100@york.ac.uk
<br>>
<br>></blockquote>

<pre>--&nbsp;

Matthew Paradis
University of York
Music Department&nbsp;
Heslington,&nbsp;
York,&nbsp;
YO10 5DD,&nbsp;
UK&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Tel: 0044-1904-43-2435&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
mdjp100@york.ac.uk</pre>
&nbsp;</html>