topic stringlengths 1 63 | text stringlengths 1 577k ⌀ |
|---|---|
he conseguido un iphone | Manuel,
Encontrada la explicación en la documentación de Apple:
[quote:380e99m5]
To play your own sounds, add the sound file to your application bundle; the sound file must adhere to the following requirements:
Must be .caf, .aif, or .wav files.
The audio data in the file must be in PCM or IMA/ADPCM (IMA4) format.
The file's audio duration must be less than 30 seconds.
[/quote:380e99m5]
Lo curioso es que en el simulador si funcionan los .aac <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> |
he conseguido un iphone | Antonio he mirado lo de llamar a una nib para cargar desde ella un view y tampoco consiguo cargarla .Según lo que he leido por internet parece que el truco esta en llamarla en applicationDidFinishLaunching .
Veo que esta definido este evento en mainapp y que pasa "algo" a harbour , pero no acabo de ver la manera de poder incluir una linea que llame a una nib determinada.¿ quizas pasandosela en un oninit ,aprovechando la llamada a harbour ?
Saludos. |
he conseguido un iphone | pregunto (realmente no he googleado)
desde window se incluye el RES al exe... pero como se hace aqui? |
he conseguido un iphone | Aquí creas archivos nib ,equivalentes a una dll
de recursos .
La llamas desde el ejecutable y listo.(tenemos que mirar como llamarlas)
Las nib se meten dentro del directorio
app como cualquier otro archivo.
Sino recuerdo mal una nib puede estar encriptada para que no se pueda abrir |
he conseguido un iphone | He conseguido llamar un view colocado en un nib desde una funcion ....
la funcion cuelkga de una accion de un boton en el view principal ...
[code=fw:2sbd01ur]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">(</span> LLAMAVIEW <span style="color: #000000;">)</span> <br /><span style="color: #000000;">{</span><br /> UIWindow * <span style="color: #0000ff;">window</span> = <span style="color: #000000;">(</span> UIWindow * <span style="color: #000000;">)</span> hb_parnl<span style="color: #000000;">(</span> <span style="color: #000000;">1</span> <span style="color: #000000;">)</span>;<br /><br /> NSArray *topLevelObjs = <span style="color: #00C800;">nil</span>;<br /> topLevelObjs = <span style="color: #000000;">[</span><span style="color: #000000;">[</span>NSBundle mainBundle<span style="color: #000000;">]</span> loadNibNamed:@<span style="color: #ff0000;">"Hola"</span> owner:<span style="color: #0000ff;">window</span> options:<span style="color: #00C800;">nil</span><span style="color: #000000;">]</span>;<br /> <br /> <span style="color: #00C800;">if</span> <span style="color: #000000;">(</span>topLevelObjs == <span style="color: #00C800;">nil</span><span style="color: #000000;">)</span> <br /> <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">(</span>@<span style="color: #ff0000;">"no encuentra nada"</span><span style="color: #000000;">)</span>;<br /> <br /> UIView * control = <span style="color: #000000;">[</span> topLevelObjs objectAtIndex : <span style="color: #000000;">0</span> <span style="color: #000000;">]</span>;<br /> <br /> <span style="color: #00C800;">if</span> <span style="color: #000000;">(</span>control == <span style="color: #00C800;">nil</span><span style="color: #000000;">)</span> <br /> <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">(</span>@<span style="color: #ff0000;">"no encuentra nada "</span><span style="color: #000000;">)</span>; <br /> <br /> <span style="color: #000000;">[</span><span style="color: #0000ff;">window</span> addSubview: <span style="color: #000000;">control</span> <span style="color: #000000;">]</span>;<br /> <br /> <span style="color: #000000;">}</span><br /> </div>[/code:2sbd01ur]
[img:2sbd01ur]http://img836.imageshack.us/img836/6058/lafotop.png[/img:2sbd01ur] |
he conseguido un iphone | Mejor aun :
[code=fw:204k4jvm]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">(</span> LLAMAVIEW <span style="color: #000000;">)</span><br /><span style="color: #000000;">{</span><br /> UIWindow * <span style="color: #0000ff;">window</span> = <span style="color: #000000;">(</span> UIWindow * <span style="color: #000000;">)</span> hb_parnl<span style="color: #000000;">(</span> <span style="color: #000000;">1</span> <span style="color: #000000;">)</span>;<br /><br /> NSArray *topLevelObjs = <span style="color: #00C800;">nil</span>;<br /> topLevelObjs = <span style="color: #000000;">[</span><span style="color: #000000;">[</span>NSBundle mainBundle<span style="color: #000000;">]</span> loadNibNamed:@<span style="color: #ff0000;">"Hola"</span> owner:<span style="color: #0000ff;">window</span> options:<span style="color: #00C800;">nil</span><span style="color: #000000;">]</span>;<br /> <br /> <span style="color: #00C800;">for</span> <span style="color: #000000;">(</span> NSObject * obj in topLevelObjs <span style="color: #000000;">)</span><br /><span style="color: #000000;">{</span><br /><span style="color: #00C800;">if</span> <span style="color: #000000;">(</span> <span style="color: #000000;">[</span>obj isKindOfClass:<span style="color: #000000;">[</span>UIView <span style="color: #00C800;">class</span><span style="color: #000000;">]</span><span style="color: #000000;">]</span> <span style="color: #000000;">)</span><br /><span style="color: #000000;">{</span><br /><span style="color: #00C800;">return</span> <span style="color: #000000;">(</span>UIView*<span style="color: #000000;">)</span>obj;<br /><span style="color: #000000;">}</span><br /><span style="color: #000000;">}</span><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span> ;<br /><span style="color: #000000;">}</span><br /><br /> <br /> </div>[/code:204k4jvm]
para el NavigationController
[code=fw:204k4jvm]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">(</span> LLAMANavController <span style="color: #000000;">)</span><br /><span style="color: #000000;">{</span><br /> UIWindow * <span style="color: #0000ff;">window</span> = <span style="color: #000000;">(</span> UIWindow * <span style="color: #000000;">)</span> hb_parnl<span style="color: #000000;">(</span> <span style="color: #000000;">1</span> <span style="color: #000000;">)</span>;<br /><br /> NSArray *topLevelObjs = <span style="color: #00C800;">nil</span>;<br /> topLevelObjs = <span style="color: #000000;">[</span><span style="color: #000000;">[</span>NSBundle mainBundle<span style="color: #000000;">]</span> loadNibNamed:@<span style="color: #ff0000;">"Hola"</span> owner:<span style="color: #0000ff;">window</span> options:<span style="color: #00C800;">nil</span><span style="color: #000000;">]</span>;<br /> <br /> <span style="color: #00C800;">for</span> <span style="color: #000000;">(</span> NSObject * obj in topLevelObjs <span style="color: #000000;">)</span><br /><span style="color: #000000;">{</span><br /><span style="color: #00C800;">if</span> <span style="color: #000000;">(</span> <span style="color: #000000;">[</span>obj isKindOfClass:<span style="color: #000000;">[</span>UINavigationController <span style="color: #00C800;">class</span><span style="color: #000000;">]</span><span style="color: #000000;">]</span> <span style="color: #000000;">)</span><br /><span style="color: #000000;">{</span><br /><span style="color: #00C800;">return</span> <span style="color: #000000;">(</span>UINavigationController*<span style="color: #000000;">)</span>obj;<br /><span style="color: #000000;">}</span><br /><span style="color: #000000;">}</span><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span> ;<br /><span style="color: #000000;">}</span><br /><br /><br /><br /> </div>[/code:204k4jvm] |
he conseguido un iphone | Manuel,
Genial! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Enhorabuena! |
he conseguido un iphone | El codigo anterior solo me devuelve 1 objeto , cuando realmente tenemos puestos muchos mas controles ... ¿? .
topLevelObjs tiene solo el view .
Saludos. |
he conseguido un iphone | [quote="Daniel Garcia-Gil":1pw74sqv]pregunto (realmente no he googleado)
desde window se incluye el RES al exe... pero como se hace aqui?[/quote:1pw74sqv]
Daniel mirate esto :
[url:1pw74sqv]http://developer.apple.com/library/mac/#documentation/DeveloperTools/Conceptual/IB_UserGuide/BuildingaNibFile/BuildingaNibFile.html[/url:1pw74sqv] |
he conseguido un iphone | Avance , Consigo asignar el texto al label mediante su tag y lo mismo al switch . Con el boton casca ( culpa mia probablemente no se hacerlo bien ) .
Saludos.
[code=fw:3tihu3zz]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">(</span> HOLA <span style="color: #000000;">)</span> <br /><span style="color: #000000;">{</span><br /> UIWindow * <span style="color: #0000ff;">window</span> = <span style="color: #000000;">(</span> UIWindow * <span style="color: #000000;">)</span> hb_parnl<span style="color: #000000;">(</span> <span style="color: #000000;">1</span> <span style="color: #000000;">)</span>;<br /><br /> NSArray *topLevelObjs = <span style="color: #00C800;">nil</span>;<br /> topLevelObjs = <span style="color: #000000;">[</span><span style="color: #000000;">[</span>NSBundle mainBundle<span style="color: #000000;">]</span> loadNibNamed:@<span style="color: #ff0000;">"Hola"</span> owner:<span style="color: #0000ff;">window</span> options:<span style="color: #00C800;">nil</span><span style="color: #000000;">]</span>;<br /><br /> UIView * view = <span style="color: #000000;">[</span> topLevelObjs objectAtIndex : <span style="color: #000000;">0</span> <span style="color: #000000;">]</span>;<br /><br /> UILabel *nameLabel = <span style="color: #000000;">(</span>UILabel*<span style="color: #000000;">)</span> <span style="color: #000000;">[</span>view viewWithTag:<span style="color: #000000;">3</span><span style="color: #000000;">]</span>;<br /> nameLabel.<span style="color: #0000ff;">text</span> = @<span style="color: #ff0000;">"Name"</span>; <br /><br /> <span style="color: #00C800;">Switch</span> * miswitch = <span style="color: #000000;">(</span><span style="color: #00C800;">Switch</span> *<span style="color: #000000;">)</span> <span style="color: #000000;">[</span>view viewWithTag:<span style="color: #000000;">66</span><span style="color: #000000;">]</span>;<br /> <span style="color: #000000;">[</span> miswitch setOn : <span style="color: #000000;">NO</span> animated : <span style="color: #000000;">YES</span> <span style="color: #000000;">]</span>; <br /><br /> <br /> <span style="color: #000000;">[</span><span style="color: #0000ff;">window</span> addSubview: view <span style="color: #000000;">]</span>;<br /> <br /> hb_retnl<span style="color: #000000;">(</span> <span style="color: #000000;">(</span> LONG <span style="color: #000000;">)</span> view <span style="color: #000000;">)</span>; <br /> <br /><span style="color: #000000;">}</span> <br /><br /> </div>[/code:3tihu3zz] |
he conseguido un iphone | En dos funciones : una coge el view , la otra asigna sus elementos :
[code=fw:3ute69ai]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> abtn<span style="color: #000000;">[</span><span style="color: #000000;">1</span><span style="color: #000000;">]</span>:<span style="color: #000000;">bAction</span>:=<span style="color: #000000;">{</span>|| yo:=Adios<span style="color: #000000;">(</span>oWnd:<span style="color: #000000;">hwnd</span><span style="color: #000000;">)</span> , tu:=Micontrol<span style="color: #000000;">(</span>yo,<span style="color: #000000;">3</span><span style="color: #000000;">)</span>, SETLABELFONT<span style="color: #000000;">(</span>tu,<span style="color: #ff0000;">"Arial"</span>,<span style="color: #000000;">50</span><span style="color: #000000;">)</span> ,SETLABELTEXT<span style="color: #000000;">(</span>tu,<span style="color: #ff0000;">"LUYEGO"</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /><br /> </div>[/code:3ute69ai]
[code=fw:3ute69ai]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /><br /><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">(</span> ADIOS <span style="color: #000000;">)</span><br /><span style="color: #000000;">{</span><br /> UIWindow * <span style="color: #0000ff;">window</span> = <span style="color: #000000;">(</span> UIWindow * <span style="color: #000000;">)</span> hb_parnl<span style="color: #000000;">(</span> <span style="color: #000000;">1</span> <span style="color: #000000;">)</span>;<br /> <br /> NSArray *topLevelObjs = <span style="color: #00C800;">nil</span>;<br /> topLevelObjs = <span style="color: #000000;">[</span><span style="color: #000000;">[</span>NSBundle mainBundle<span style="color: #000000;">]</span> loadNibNamed:@<span style="color: #ff0000;">"Hola"</span> owner:<span style="color: #0000ff;">window</span> options:<span style="color: #00C800;">nil</span><span style="color: #000000;">]</span>;<br /> <br /> UIView * view = <span style="color: #000000;">[</span> topLevelObjs objectAtIndex : <span style="color: #000000;">0</span> <span style="color: #000000;">]</span>;<br /> <br /> <span style="color: #B900B9;">// UILabel *nameLabel = (UILabel*) [view viewWithTag:3];</span><br /> <span style="color: #B900B9;">// nameLabel.text = @"Name"; </span><br /> <br /><span style="color: #B900B9;">// Switch * miswitch = (Switch *) [view viewWithTag:66];</span><br /> <span style="color: #B900B9;">// [ miswitch setOn : NO animated : YES ]; </span><br /> <br /> <span style="color: #000000;">[</span><span style="color: #0000ff;">window</span> addSubview: view <span style="color: #000000;">]</span>;<br /> <br /> hb_retnl<span style="color: #000000;">(</span> <span style="color: #000000;">(</span> LONG <span style="color: #000000;">)</span> view <span style="color: #000000;">)</span>; <br /> <br /><span style="color: #000000;">}</span> <br /><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">(</span> MICONTROL <span style="color: #000000;">)</span><br /><span style="color: #000000;">{</span><br /> UIWindow * <span style="color: #0000ff;">window</span> = <span style="color: #000000;">(</span> UIWindow * <span style="color: #000000;">)</span> hb_parnl<span style="color: #000000;">(</span> <span style="color: #000000;">1</span> <span style="color: #000000;">)</span>;<br /> ;<br /> <br /> NSObject * miobj = <span style="color: #000000;">(</span>NSObject *<span style="color: #000000;">)</span> <span style="color: #000000;">[</span><span style="color: #0000ff;">window</span> viewWithTag:<span style="color: #000000;">hb_parnl</span><span style="color: #000000;">(</span> <span style="color: #000000;">2</span> <span style="color: #000000;">)</span><span style="color: #000000;">]</span>;<br /> <br /> hb_retnl<span style="color: #000000;">(</span> <span style="color: #000000;">(</span> LONG <span style="color: #000000;">)</span> miobj <span style="color: #000000;">)</span>; <br /> <br /><span style="color: #000000;">}</span> <br /><br /> </div>[/code:3ute69ai] |
he conseguido un iphone | Primera funcion operativa : recupera un view desde recursos . Todo subido al repositorio nibs.m , tutornibs.prg, y label.prg y view.prg
[code=fw:3nokug0n]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">(</span> GETVIEWRESOURCE <span style="color: #000000;">)</span><br /><span style="color: #000000;">{</span><br /> UIWindow * <span style="color: #0000ff;">window</span> = <span style="color: #000000;">(</span> UIWindow * <span style="color: #000000;">)</span> hb_parnl<span style="color: #000000;">(</span> <span style="color: #000000;">1</span> <span style="color: #000000;">)</span>;<br /> NSString * cNib = hb_NSSTRING_par<span style="color: #000000;">(</span> <span style="color: #000000;">2</span> <span style="color: #000000;">)</span>; <br /> <br /> NSArray *topLevelObjs = <span style="color: #00C800;">nil</span>;<br /> topLevelObjs = <span style="color: #000000;">[</span><span style="color: #000000;">[</span>NSBundle mainBundle<span style="color: #000000;">]</span> loadNibNamed: <span style="color: #000000;">cNib</span> owner:<span style="color: #0000ff;">window</span> options:<span style="color: #00C800;">nil</span><span style="color: #000000;">]</span>;<br /> <br /> UIView * view = <span style="color: #000000;">[</span> topLevelObjs objectAtIndex : <span style="color: #000000;">0</span> <span style="color: #000000;">]</span>;<br /> <br /> <span style="color: #000000;">[</span><span style="color: #0000ff;">window</span> addSubview: view <span style="color: #000000;">]</span>;<br /> <br /> hb_retnl<span style="color: #000000;">(</span> <span style="color: #000000;">(</span> LONG <span style="color: #000000;">)</span> view <span style="color: #000000;">)</span>; <br /> <br /><span style="color: #000000;">}</span> <br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">(</span> GETCONTROLRESOURCE <span style="color: #000000;">)</span><br /><span style="color: #000000;">{</span><br /> UIWindow * <span style="color: #0000ff;">window</span> = <span style="color: #000000;">(</span> UIWindow * <span style="color: #000000;">)</span> hb_parnl<span style="color: #000000;">(</span> <span style="color: #000000;">1</span> <span style="color: #000000;">)</span>;<br /> <br /> NSObject * miobj = <span style="color: #000000;">(</span>NSObject *<span style="color: #000000;">)</span> <span style="color: #000000;">[</span><span style="color: #0000ff;">window</span> viewWithTag:<span style="color: #000000;">hb_parnl</span><span style="color: #000000;">(</span> <span style="color: #000000;">2</span> <span style="color: #000000;">)</span><span style="color: #000000;">]</span>;<br /> <br /> hb_retnl<span style="color: #000000;">(</span> <span style="color: #000000;">(</span> LONG <span style="color: #000000;">)</span> miobj <span style="color: #000000;">)</span>; <br /> <br /><span style="color: #000000;">}</span> <br /><br /><br /><br /> </div>[/code:3nokug0n]
y metodos para tView y tLabel
[code=fw:3nokug0n]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">METHOD</span> Resources<span style="color: #000000;">(</span> oWnd, cResource <span style="color: #000000;">)</span> <span style="color: #00C800;">CLASS</span> TView<br /> ::<span style="color: #000000;">hWnd</span> = GETVIEWRESOURCE<span style="color: #000000;">(</span> oWnd:<span style="color: #000000;">hWnd</span>,cResource <span style="color: #000000;">)</span><br /> AAdd<span style="color: #000000;">(</span> GetAllWin<span style="color: #000000;">(</span><span style="color: #000000;">)</span>, <span style="color: #00C800;">Self</span> <span style="color: #000000;">)</span> <br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">Self</span> <br /><br /><span style="color: #00C800;">METHOD</span> Resources<span style="color: #000000;">(</span> oWnd, idResource <span style="color: #000000;">)</span> <span style="color: #00C800;">CLASS</span> TLabel<br /> ::<span style="color: #000000;">hWnd</span> = GetControlResource<span style="color: #000000;">(</span> oWnd:<span style="color: #000000;">hWnd</span>,idResource <span style="color: #000000;">)</span> <br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">Self</span><br /><br /> </div>[/code:3nokug0n]
Ejemplo funcionando partiendo de tutorbutton :
[code=fw:3nokug0n]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> ......<br /> abtn<span style="color: #000000;">[</span><span style="color: #000000;">1</span><span style="color: #000000;">]</span>:<span style="color: #000000;">bAction</span>:=<span style="color: #000000;">{</span>|| llamaview<span style="color: #000000;">(</span>ownd<span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br />.....<br /> <br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00C800;">Function</span> llamaview<span style="color: #000000;">(</span>ownd<span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">local</span> oView:=tView<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #000000;">resources</span><span style="color: #000000;">(</span>ownd,<span style="color: #ff0000;">"Hola"</span><span style="color: #000000;">)</span><br /><span style="color: #00C800;">local</span> oLabel:=tLabel<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #000000;">resources</span><span style="color: #000000;">(</span>oView,<span style="color: #000000;">3</span><span style="color: #000000;">)</span><br /> oLabel:<span style="color: #000000;">SETFONT</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"Helvetica"</span>,<span style="color: #000000;">20</span><span style="color: #000000;">)</span><br /> olabel:<span style="color: #000000;">setText</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"SI"</span><span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">Return</span> <span style="color: #00C800;">nil</span><br /><br /> </div>[/code:3nokug0n] |
he conseguido un iphone | Manuel,
Muy bueno, muchas gracias! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> |
he conseguido un iphone | [quote="mastintin":4rt3htz4][quote="Daniel Garcia-Gil":4rt3htz4]pregunto (realmente no he googleado)
desde window se incluye el RES al exe... pero como se hace aqui?[/quote:4rt3htz4]
Daniel mirate esto :
[url:4rt3htz4]http://developer.apple.com/library/mac/#documentation/DeveloperTools/Conceptual/IB_UserGuide/BuildingaNibFile/BuildingaNibFile.html[/url:4rt3htz4][/quote:4rt3htz4]
Manuel
GRACIAS!! <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> |
he conseguido un iphone | He subido un monton de pequeñas nuevas funciones que estan aun sin probar al repositorio .
Queda pendiente la implementacion del evento llamado por el evento del NStimer , y probar y limpiar el código .
Yo por hoy lo dejo ....
Un saludo. |
he conseguido un iphone | Setbagenumber funcionando :
[img:3t21vopx]http://img703.imageshack.us/img703/3923/lafoto.png[/img:3t21vopx]
IMAGETOROUNDIMAGE funcionando .
[img:3t21vopx]http://img10.imageshack.us/img10/3923/lafoto.png[/img:3t21vopx]
IMAGEREFLESFROMIMAGEVIEW funcionando:
[img:3t21vopx]http://img836.imageshack.us/img836/5092/lafotoy.png[/img:3t21vopx] |
he conseguido un iphone | ...
Nueva clase TDatePicker
[img:2ixig4e0]http://www.sitasoft.net/fivemac/iphone/screen/IMG_0080.png[/img:2ixig4e0] |
he conseguido un iphone | Añadida opcion grouped al tableview , autodetecion de un array ( si bdata es un array se detecta) .
[img:2f2ltnsq]http://img696.imageshack.us/img696/3923/lafoto.png[/img:2f2ltnsq] |
he conseguido un iphone | Comenzado a implemetar los heads del tableview . La idea es tener una DATA aHeads , array con los encabezados de seccion . he escrito este código , pero no puedo probarlo ya que estoy fuera .
Si alguien quiere mirar si esta bien y compila ....
En tblview.prg
[code=fw:3k3x9ob8]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /><span style="color: #00C800;">DATA</span> aHeads<br /><br /><span style="color: #00C800;">METHOD</span> HandleEvent<span style="color: #000000;">(</span> nMsg, hSender, uParam1, uParam2 <span style="color: #000000;">)</span> <span style="color: #00C800;">CLASS</span> TTableView<br /> .....<br /> <span style="color: #00C800;">do</span> <span style="color: #00C800;">case</span><br /> <br /> <span style="color: #00C800;">case</span> nMsg == WM_BRWHEAD<br /> <span style="color: #00C800;">if</span> Empty<span style="color: #000000;">(</span>::<span style="color: #000000;">aHeads</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">Return</span> <span style="color: #00C800;">nil</span><br /> <span style="color: #00C800;">else</span><br /> <span style="color: #00C800;">Return</span> ::<span style="color: #000000;">aHeads</span><span style="color: #000000;">[</span>uParam1 + <span style="color: #000000;">1</span> <span style="color: #000000;">]</span><br /> <span style="color: #00C800;">endif</span> <br /> ..... <br /> <br /> <br /> </div>[/code:3k3x9ob8]
en tableview.m
[code=fw:3k3x9ob8]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br />@implementation DataSource<br /><br />- <span style="color: #000000;">(</span>NSString *<span style="color: #000000;">)</span>tableView:<span style="color: #000000;"><span style="color: #000000;">(</span>UITableView</span> *<span style="color: #000000;">)</span>tableView titleForHeaderInSection:<span style="color: #000000;"><span style="color: #000000;">(</span>NSInteger</span><span style="color: #000000;">)</span>section<br /><span style="color: #000000;">{</span><br />NSString * <span style="color: #0000ff;">text</span>;<br /><br /> hb_vmPushSymbol<span style="color: #000000;">(</span> symFPH <span style="color: #000000;">)</span>;<br /> hb_vmPushNil<span style="color: #000000;">(</span><span style="color: #000000;">)</span>;<br /> hb_vmPushLong<span style="color: #000000;">(</span> <span style="color: #000000;">(</span> LONG <span style="color: #000000;">)</span> tableView <span style="color: #000000;">)</span>;<br /> hb_vmPushLong<span style="color: #000000;">(</span> WM_BRWHEAD <span style="color: #000000;">)</span>;<br /> hb_vmPushLong<span style="color: #000000;">(</span> <span style="color: #000000;">0</span> <span style="color: #000000;">)</span>;<br /> hb_vmPushLong<span style="color: #000000;">(</span> section <span style="color: #000000;">)</span>;<br /> hb_vmDo<span style="color: #000000;">(</span> <span style="color: #000000;">4</span> <span style="color: #000000;">)</span>;<br /> <br /> <span style="color: #0000ff;">text</span> = <span style="color: #000000;">[</span> <span style="color: #000000;">[</span> <span style="color: #000000;">[</span> NSString alloc <span style="color: #000000;">]</span> initWithCString: <span style="color: #000000;">ISCHAR</span><span style="color: #000000;">(</span> <span style="color: #000000;">-1</span> <span style="color: #000000;">)</span> ? hb_parc<span style="color: #000000;">(</span> <span style="color: #000000;">-1</span> <span style="color: #000000;">)</span> : <span style="color: #ff0000;">""</span> <span style="color: #000000;">]</span> autorelease <span style="color: #000000;">]</span>;<br /> <br /> <span style="color: #00C800;">return</span> <span style="color: #0000ff;">text</span> ; <br /> <br /><br /><span style="color: #000000;">}</span><br /> </div>[/code:3k3x9ob8] |
he conseguido un iphone | added timer events. New samples/timer.prg
Affected files expand all collapse all
Modify /trunk/include/fmsgs.h diff
Modify /trunk/include/windows.h diff
Modify /trunk/makefile diff
Modify /trunk/samples/buildmac.sh diff
Add /trunk/samples/timer.prg diff
Modify /trunk/source/sdkapi/timers.m diff
Modify /trunk/source/sdkapi/windows.m diff |
he conseguido un iphone | [quote="Antonio Linares":2ka6qe53]added timer events. New samples/timer.prg
Affected files expand all collapse all
Modify /trunk/include/fmsgs.h diff
Modify /trunk/include/windows.h diff
Modify /trunk/makefile diff
Modify /trunk/samples/buildmac.sh diff
Add /trunk/samples/timer.prg diff
Modify /trunk/source/sdkapi/timers.m diff
Modify /trunk/source/sdkapi/windows.m diff[/quote:2ka6qe53]
Estupendo ya tenemos timer ... <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> |
he conseguido un iphone | [quote="mastintin":15yjuae6]Comenzado a implemetar los heads del tableview . La idea es tener una DATA aHeads , array con los encabezados de seccion . he escrito este código , pero no puedo probarlo ya que estoy fuera .
Si alguien quiere mirar si esta bien y compila ....
En tblview.prg
[code=fw:15yjuae6]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /><span style="color: #00C800;">DATA</span> aHeads<br /><br /><span style="color: #00C800;">METHOD</span> HandleEvent<span style="color: #000000;">(</span> nMsg, hSender, uParam1, uParam2 <span style="color: #000000;">)</span> <span style="color: #00C800;">CLASS</span> TTableView<br /> .....<br /> <span style="color: #00C800;">do</span> <span style="color: #00C800;">case</span><br /> <br /> <span style="color: #00C800;">case</span> nMsg == WM_BRWHEAD<br /> <span style="color: #00C800;">if</span> Empty<span style="color: #000000;">(</span>::<span style="color: #000000;">aHeads</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">Return</span> <span style="color: #00C800;">nil</span><br /> <span style="color: #00C800;">else</span><br /> <span style="color: #00C800;">Return</span> ::<span style="color: #000000;">aHeads</span><span style="color: #000000;">[</span>uParam1 + <span style="color: #000000;">1</span> <span style="color: #000000;">]</span><br /> <span style="color: #00C800;">endif</span> <br /> ..... <br /> <br /> <br /> </div>[/code:15yjuae6]
en tableview.m
[code=fw:15yjuae6]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br />@implementation DataSource<br /><br />- <span style="color: #000000;">(</span>NSString *<span style="color: #000000;">)</span>tableView:<span style="color: #000000;"><span style="color: #000000;">(</span>UITableView</span> *<span style="color: #000000;">)</span>tableView titleForHeaderInSection:<span style="color: #000000;"><span style="color: #000000;">(</span>NSInteger</span><span style="color: #000000;">)</span>section<br /><span style="color: #000000;">{</span><br />NSString * <span style="color: #0000ff;">text</span>;<br /><br /> hb_vmPushSymbol<span style="color: #000000;">(</span> symFPH <span style="color: #000000;">)</span>;<br /> hb_vmPushNil<span style="color: #000000;">(</span><span style="color: #000000;">)</span>;<br /> hb_vmPushLong<span style="color: #000000;">(</span> <span style="color: #000000;">(</span> LONG <span style="color: #000000;">)</span> tableView <span style="color: #000000;">)</span>;<br /> hb_vmPushLong<span style="color: #000000;">(</span> WM_BRWHEAD <span style="color: #000000;">)</span>;<br /> hb_vmPushLong<span style="color: #000000;">(</span> <span style="color: #000000;">0</span> <span style="color: #000000;">)</span>;<br /> hb_vmPushLong<span style="color: #000000;">(</span> section <span style="color: #000000;">)</span>;<br /> hb_vmDo<span style="color: #000000;">(</span> <span style="color: #000000;">4</span> <span style="color: #000000;">)</span>;<br /> <br /> <span style="color: #0000ff;">text</span> = <span style="color: #000000;">[</span> <span style="color: #000000;">[</span> <span style="color: #000000;">[</span> NSString alloc <span style="color: #000000;">]</span> initWithCString: <span style="color: #000000;">ISCHAR</span><span style="color: #000000;">(</span> <span style="color: #000000;">-1</span> <span style="color: #000000;">)</span> ? hb_parc<span style="color: #000000;">(</span> <span style="color: #000000;">-1</span> <span style="color: #000000;">)</span> : <span style="color: #ff0000;">""</span> <span style="color: #000000;">]</span> autorelease <span style="color: #000000;">]</span>;<br /> <br /> <span style="color: #00C800;">return</span> <span style="color: #0000ff;">text</span> ; <br /> <br /><br /><span style="color: #000000;">}</span><br /> </div>[/code:15yjuae6][/quote:15yjuae6]
Subido al repositorio probado y funcionando. |
he conseguido un iphone | Tableview desde "recursos" funcionando ....Subido codigo al repositorio.
[img:2gi69elo]http://img821.imageshack.us/img821/4384/lafotov.png[/img:2gi69elo] |
he conseguido un iphone | Manuel,
Enhorabuena <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Has visto mi post acerca del simulador del iphone ? <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> |
he conseguido un iphone | [quote="Antonio Linares":12onlgbs]Manuel,
Enhorabuena <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Has visto mi post acerca del simulador del iphone ? <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->[/quote:12onlgbs]
Si ,lo he visto cuando subí el comentario anterior ...
Aunque a los que tenemos iphone no se en que medida nos agiliza el trabajo , abre una puerta a quienes no disponen de el y quieren realizar experimentos . A nosotros tambien puede venirnos bien en momentos que no dispongamos de wifi .
Saludos. |
he conseguido un iphone | Por cierto ... me encuentro con un problemilla , como ves en las capturas de pantalla los views salen movidos hacia arriba , el ancho que corrsponde con la info del iphone ( la pila que queda, compañia y demas ) .
Ya me había dado cuenta cuando colocaba con código los controles , pero lo sulucionaba bajandolos 20pxles. pero ahora con los recursos es muy evidente ....
como podemos solucionarlo ?
Saludos. |
he conseguido un iphone | Muy buenas, estoy intentando compilar ahora desde un Mac, me podeis decir los pasos necesarios para compilar desde ahí.
Un Saludo y Mil Gracias. |
he conseguido un iphone | [quote="softruz":2s900hp8]Muy buenas, estoy intentando compilar ahora desde un Mac, me podeis decir los pasos necesarios para compilar desde ahí.
Un Saludo y Mil Gracias.[/quote:2s900hp8]
LO primero instala el paquete de desarrollo de apple , si no lo tienes , [url:2s900hp8]http://developer.apple.com/devcenter/ios/index.action[/url:2s900hp8]
Luego te bajas el Harbour para iphone ( esta en este mismo post , hacia el principio ) , sino lo encuentras se te envia sin problemas .
Te cojes el repositorio de fivephone con lo ultimo subido .
Creas una carpeta ( donde tu quieras, yo la tengo en el escritorio ) dentro el harbour en una carpeta y el fivephone en otra carpeta .
puedes disponer de un programa ftp para mas comodidad ( yo uso el filezilla) ...
Terminal ... subes al fivephone y make para construir las librerias ....
Te lo dejo aqui ... cuando tengas todo lo anterior seguimos ...
Saludos. |
he conseguido un iphone | Resuelto el Problema de "descuadre" de las view desde recursos .
Añadido soporte para recursos a webview , imgview, y progress , aun no probados , pero ya estan subidos al repositorio .
Saludos. |
he conseguido un iphone | Añadida la función MsgLogo() y samples/logo.prg
[code=fw:2o5d5y84]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> oWnd := TWindow<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, oLabel<br /> <br /> oLabel = TLabel<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span> oWnd, <span style="color: #ff0000;">"Hello world!"</span>, <span style="color: #000000;">120</span>, <span style="color: #000000;">100</span>, <span style="color: #000000;">100</span>, <span style="color: #000000;">50</span> <span style="color: #000000;">)</span><br /> oLabel:<span style="color: #000000;">SetColor</span><span style="color: #000000;">(</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">255</span>, <span style="color: #000000;">255</span>, <span style="color: #000000;">255</span> <span style="color: #000000;">)</span><br /> <br /> oWnd:<span style="color: #0000ff;">Activate</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <br /> MsgLogo<span style="color: #000000;">(</span> <span style="color: #ff0000;">"logo.png"</span> <span style="color: #000000;">)</span><br /> <br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span> <br /> </div>[/code:2o5d5y84]
[img:2o5d5y84]http://img225.imageshack.us/img225/3923/lafoto.png[/img:2o5d5y84] |
he conseguido un iphone | He subido logo.prg al repositorio porque estaba desaparecido <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
Saludos. |
he conseguido un iphone | Probado y funcionando desde recursos webview,imgview,progress,pickerview . Subidas pequeñas correcciones a bugs.
Saludos. |
he conseguido un iphone | Daniel ,tengo problemas para poner a funcionar el button a recursos ...
El problema parece que viene por que la clase button no deriva de uibutton ,sino de nsobject .
el codigo que tengo pare e correcto , te lo pongo a continuación :
en nibs.m una funcion especial para que coja los button :
[code=fw:1xvpnv33]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">(</span> GETBUTTONRESOURCE <span style="color: #000000;">)</span><br /><span style="color: #000000;">{</span><br /> UIWindow * <span style="color: #0000ff;">window</span> = <span style="color: #000000;">(</span> UIWindow * <span style="color: #000000;">)</span> hb_parnl<span style="color: #000000;">(</span> <span style="color: #000000;">1</span> <span style="color: #000000;">)</span>;<br /> NSObject * miobj = <span style="color: #000000;">(</span>NSObject *<span style="color: #000000;">)</span> <span style="color: #000000;">[</span><span style="color: #0000ff;">window</span> viewWithTag:<span style="color: #000000;">hb_parnl</span><span style="color: #000000;">(</span> <span style="color: #000000;">2</span> <span style="color: #000000;">)</span><span style="color: #000000;">]</span>;<br /> <br /> hb_OBJECT_ret<span style="color: #000000;">(</span> miobj <span style="color: #000000;">)</span>; <br /> <br /><span style="color: #000000;">}</span> <br /><br /> </div>[/code:1xvpnv33]
en buttons.m
[code=fw:1xvpnv33]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">(</span> CREATEBUTTONRESOURCES <span style="color: #000000;">)</span><br /><span style="color: #000000;">{</span><br /> <span style="color: #0000ff;">Button</span> * <span style="color: #0000ff;">button</span> = <span style="color: #000000;">(</span> <span style="color: #0000ff;">Button</span> * <span style="color: #000000;">)</span> hb_OBJECT_par<span style="color: #000000;">(</span> <span style="color: #000000;">1</span> <span style="color: #000000;">)</span>;<br /> <span style="color: #000000;">[</span> <span style="color: #0000ff;">button</span> setSender : <span style="color: #000000;">hb_gcGripGet</span><span style="color: #000000;">(</span> hb_param<span style="color: #000000;">(</span> <span style="color: #000000;">2</span>, HB_IT_ANY <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #000000;">]</span>;<br /><span style="color: #000000;">}</span><br /><br /> </div>[/code:1xvpnv33]
en button.prg
[code=fw:1xvpnv33]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /><br /><span style="color: #00C800;">METHOD</span> Resources<span style="color: #000000;">(</span> oWnd, idResource, bAction <span style="color: #000000;">)</span> <span style="color: #00C800;">CLASS</span> TButton<br /> <br /> ::<span style="color: #000000;">hWnd</span> = GetbuttonResource<span style="color: #000000;">(</span> oWnd:<span style="color: #000000;">hWnd</span>,idResource <span style="color: #000000;">)</span> <br /><br /> ::<span style="color: #000000;">bAction</span> = bAction<br /><br /> CreateButtonResources<span style="color: #000000;">(</span>::<span style="color: #000000;">hWnd</span>,<span style="color: #00C800;">Self</span><span style="color: #000000;">)</span><br /> <br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">Self</span> <br /><br /> </div>[/code:1xvpnv33]
El tema es que si en recursos pongo un uibutton puro , o button derivado de nsobject o button derivado de uibutton con su tag asociado , el programa casca..
Salidos. |
he conseguido un iphone | Manuel
el iphone se me daño y mañana (11-11) me llega el nuevo iphone (4) <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
por eso he estado algo ausente y de poca productividad
lo veo tan pronto tenga el telefono en mi poder nuevamente |
he conseguido un iphone | Added background image support for tableview cells. New samples/brwarray.prg
Affected files expand all collapse all
Add /trunk/images/cell.png diff
Modify /trunk/include/fmsgs.h diff
Modify /trunk/makefile diff
Add /trunk/samples/brwarray.prg diff
Modify /trunk/samples/buildmac.sh diff
Modify /trunk/source/classes/tblview.prg diff
Modify /trunk/source/sdkapi/tableview.m diff
[code=fw:19ioa3sa]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> oWnd := TWindow<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, oBrw <br /> <br /> oBrw = TTableView<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span> oWnd, <span style="color: #000000;">20</span>,, <span style="color: #000000;">{</span> <span style="color: #ff0000;">"One"</span>, <span style="color: #ff0000;">"Two"</span>, <span style="color: #ff0000;">"Three"</span>, <span style="color: #ff0000;">"Four"</span>, <span style="color: #ff0000;">"Five"</span> <span style="color: #000000;">}</span> <span style="color: #000000;">)</span><br /><br /> oBrw:<span style="color: #000000;">bCellImage</span> = <span style="color: #000000;">{</span> || <span style="color: #ff0000;">"cell.png"</span> <span style="color: #000000;">}</span><br /><br /> oWnd:<span style="color: #0000ff;">Activate</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /> </div>[/code:19ioa3sa]
[img:19ioa3sa]http://img844.imageshack.us/img844/5988/lafoto1.png[/img:19ioa3sa] |
he conseguido un iphone | Setting the desired height for the TableView cell, samples/brwarray.prg
Affected files expand all collapse all
Modify /trunk/samples/brwarray.prg diff
Modify /trunk/source/classes/tblview.prg diff
Modify /trunk/source/sdkapi/tableview.m diff
[img:1o04m5lx]http://img209.imageshack.us/img209/108/lafoto2.png[/img:1o04m5lx] |
he conseguido un iphone | accessoryType for TableView cells, samples/brwarray.prg
Affected files expand all collapse all
Modify /trunk/source/sdkapi/tableview.m diff
[img:1kenszaj]http://img545.imageshack.us/img545/4896/lafoto3.png[/img:1kenszaj] |
he conseguido un iphone | Support for TableViell cell background and image, samples/brwarray.prg
Affected files expand all collapse all
Add /trunk/images/fts.png diff
Modify /trunk/include/fmsgs.h diff
Modify /trunk/samples/brwarray.prg diff
Modify /trunk/samples/buildmac.sh diff
Modify /trunk/source/classes/tblview.prg diff
Modify /trunk/source/sdkapi/tableview.m diff
[code=fw:3paistfe]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> oWnd := TWindow<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, oBrw <br /> <br /> <span style="color: #B900B9;">// 92 is the cell desired height</span><br /> oBrw = TTableView<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span> oWnd, <span style="color: #000000;">20</span>,, <span style="color: #000000;">{</span> <span style="color: #ff0000;">"One"</span>, <span style="color: #ff0000;">"Two"</span>, <span style="color: #ff0000;">"Three"</span>, <span style="color: #ff0000;">"Four"</span>, <span style="color: #ff0000;">"Five"</span> <span style="color: #000000;">}</span>,, <span style="color: #000000;">92</span> <span style="color: #000000;">)</span><br /><br /> oBrw:<span style="color: #000000;">bCellBack</span> = <span style="color: #000000;">{</span> || <span style="color: #ff0000;">"cell.png"</span> <span style="color: #000000;">}</span><br /> oBrw:<span style="color: #000000;">bCellImage</span> = <span style="color: #000000;">{</span> || <span style="color: #ff0000;">"fts.png"</span> <span style="color: #000000;">}</span><br /><br /> oWnd:<span style="color: #0000ff;">Activate</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /> </div>[/code:3paistfe]
[img:3paistfe]http://img820.imageshack.us/img820/3355/lafoto4.png[/img:3paistfe] |
he conseguido un iphone | Antonio , tremendo ... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: --> <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
Saludos. |
he conseguido un iphone | Firing an action when a TableView cell is selected, samples/brwarray.prg
Affected files expand all collapse all
Modify /trunk/include/fmsgs.h diff
Modify /trunk/samples/brwarray.prg diff
Modify /trunk/source/classes/tblview.prg diff
Modify /trunk/source/sdkapi/tableview.m diff
[code=fw:3i45ujky]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> oWnd := TWindow<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, oBrw <br /> <br /> <span style="color: #B900B9;">// 92 is the cell desired height</span><br /> oBrw = TTableView<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span> oWnd, <span style="color: #000000;">20</span>,, <span style="color: #000000;">{</span> <span style="color: #ff0000;">"One"</span>, <span style="color: #ff0000;">"Two"</span>, <span style="color: #ff0000;">"Three"</span>, <span style="color: #ff0000;">"Four"</span>, <span style="color: #ff0000;">"Five"</span> <span style="color: #000000;">}</span>,, <span style="color: #000000;">92</span> <span style="color: #000000;">)</span><br /><br /> oBrw:<span style="color: #000000;">bSelect</span> = <span style="color: #000000;">{</span> | nRow, nSection | <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">(</span> Str<span style="color: #000000;">(</span> nRow <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /> oBrw:<span style="color: #000000;">bCellBack</span> = <span style="color: #000000;">{</span> || <span style="color: #ff0000;">"cell.png"</span> <span style="color: #000000;">}</span><br /> oBrw:<span style="color: #000000;">bCellImage</span> = <span style="color: #000000;">{</span> || <span style="color: #ff0000;">"fts.png"</span> <span style="color: #000000;">}</span><br /><br /> oWnd:<span style="color: #0000ff;">Activate</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /> </div>[/code:3i45ujky]
[img:3i45ujky]http://img152.imageshack.us/img152/5651/lafoto5.png[/img:3i45ujky] |
he conseguido un iphone | Añadido las nuevas caracteristicas de tableview desde recursos ....
Antonio , la implementación es muy buena , pero nos limita mucho la construcción de celdas "personalizadas" ( con controles dentro y esas cosas ) . Pienso que debemos crear una clase tableviewcell y mirar como colocarla en la tableview ( pasandola igual que brwvalue pero su hwnd , creo yo)
Voy a implementar una clase base ( cells.m ) y miramos como queda.
Saludos. |
he conseguido un iphone | Saludos
Ya tengo el nuevo iphone <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
retome las riendas, los botones ya no cascan en los recursos estoy tratando de resolver el rutado de los eventos para subir los cambios |
he conseguido un iphone | Daniel bienvenido <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> .
En el codigo de tableview m veo que todo lo que se devuelve son texto para asignar propiedades . mi idea era crear una clase cell con todas las propiedades y devolverla al tableview igual que hacemos con el texto de nombre de imagen pero devolviendo el objeto completo ( me imagino que mediante su hwnd ) ¿ como se podría hacer ? . |
he conseguido un iphone | Daniel,
Que bueno que ya tengas iphone de nuevo <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Manuel,
Si, se puede hacer de ambas maneras. De todas formas, hoy solo he estado haciendo pruebas para ir afianzando conceptos y entenderlo mejor <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> |
he conseguido un iphone | Ya lo tengo . Subo el codigo al repositorio ,aunque falla el cells.m ( tenemos que crear bien la clase, para que se vea bien ) , pero pasar pasa y devolver se devuelve ....
La idea es que tableview tiene una data ocell ( para celda personalizada ) . Si quiero personalizar las celdas creo un objeto celda y lo asigno a ocell sino devuelve nil .
se pueden tener los objetos ocell que queramos todos distintos , y segun que celda sea ,hacer que se asigne uno u otro ( se me ocurre)
Falta por implementar tambien que no se haga la asignacion si hb_parl(-1) es nil , pero no se exactamente como se hace.
[code=fw:4ta7weih]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br />cell = <span style="color: #000000;">(</span> UITableViewCell * <span style="color: #000000;">)</span> hb_parnl<span style="color: #000000;">(</span> <span style="color: #000000;">-1</span> <span style="color: #000000;">)</span> ;<br /><br /> </div>[/code:4ta7weih]
El codigo ejemplo :
[code=fw:4ta7weih]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> oWnd := TWindow<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, oBrw <br /> <br /> <span style="color: #B900B9;">// 92 is the cell desired height</span><br /> oBrw = TTableView<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span> oWnd, <span style="color: #000000;">20</span>,, <span style="color: #000000;">{</span> <span style="color: #ff0000;">"One"</span>, <span style="color: #ff0000;">"Two"</span>, <span style="color: #ff0000;">"Three"</span>, <span style="color: #ff0000;">"Four"</span>, <span style="color: #ff0000;">"Five"</span> <span style="color: #000000;">}</span>,, <span style="color: #000000;">92</span> <span style="color: #000000;">)</span><br /><br /><br /><span style="color: #B900B9;">// oBrw:bSelect = { | nRow, nSection | MsgInfo( nRow ) }</span><br /><span style="color: #B900B9;">// oBrw:bCellBack = { || "cell.png" }</span><br /> <span style="color: #B900B9;">// oBrw:bCellImage = { || "fts.png" }</span><br /> obrw:<span style="color: #000000;">ocell</span>:= CREATECELL<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> oWnd:<span style="color: #0000ff;">Activate</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /> </div>[/code:4ta7weih] |
he conseguido un iphone | Saludos
He subido las pruebas que hice de los botones desde recursos, el punto esta en que no retorna un Handle valido [b:2xthbia6]window viewWithTag:[/b:2xthbia6]
lo probe con varios controles y en lo unico que funciona es en los LABEL
el ejemplo tutornibs tiene una trazamostarnado el valor del handle del botton despues de usar [b:2xthbia6]window viewWithTag:[/b:2xthbia6]
no he podido encontrar el problema |
he conseguido un iphone | [quote="Daniel Garcia-Gil":it399d9a]Saludos
lo probe con varios controles y en lo unico que funciona es en los LABEL
[/quote:it399d9a]
Daniel no entiendo muy bien lo que me dices aqui . Yo en mis pruebas he implementado unos cuantos controles mas y funcionan correctamente desde recursos ademas de los labels tengo los tableview , los picker, etc... <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->
¿ |
he conseguido un iphone | [quote="mastintin":1anr1qp3][quote="Daniel Garcia-Gil":1anr1qp3]Saludos
lo probe con varios controles y en lo unico que funciona es en los LABEL
[/quote:1anr1qp3]
Daniel no entiendo muy bien lo que me dices aqui . Yo en mis pruebas he implementado unos cuantos controles mas y funcionan correctamente desde recursos ademas de los labels tengo los tableview , los picker, etc... <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->
¿[/quote:1anr1qp3]
Yo lo probe con todos los controles que aparecen dentro del nib y el unico que funciona es el UILabel, probe con otros controles con el mismo resultado... solo me arroja un handle valido los UILabel
(puede que me embote) |
he conseguido un iphone | Daniel he subido un hola.nib y un tutornibs.prg que a mi me funcionan sin problemas ... tableview desde recursos... mira a ver si a ti te funcionan bien .
la captura es esta :
[img:1mkcb4je]http://img691.imageshack.us/img691/3923/lafoto.png[/img:1mkcb4je] |
he conseguido un iphone | He hecho una primera aproximacion de como poder personalizar las celdas de untableview con una clase Tableviewcell que nos puede dar mucha versatilidad .
Estilo pijama :
[img:3gf8zc6y]http://img42.imageshack.us/img42/8555/lafotou.png[/img:3gf8zc6y] |
he conseguido un iphone | Ando analizando y considerando el establecer un "puente" desde PRG a Objective-C que tal vez pueda ser más cómodo que construir todo desde Objective-C.
La idea es rutar los mensajes enviados a un objeto desde PRG a sus correspondientes mensajes en Objective-C. Veo ventajas e inconvenientes, por eso voy a comentar lo que he visto y asi lo analizamos entre todos <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Para enviar un mensaje a un objeto en Objective-C se usa un "selector". La clave está en que podemos construir un selector a partir de una cadena:
[code=fw:cv6g36d9]<div class="fw" id="{CB}" style="font-family: monospace;"><br />SEL Selector = NSSelectorFromString<span style="color: #000000;">(</span> @<span style="color: #ff0000;">"Mensaje:"</span><span style="color: #000000;">)</span>; <span style="color: #B900B9;">// Ojo que hay que especificar ":" al final del nombre del mensaje</span><br /> </div>[/code:cv6g36d9]
Pasando varios parámetros al mensaje:
[code=fw:cv6g36d9]<div class="fw" id="{CB}" style="font-family: monospace;"><br />SEL Selector = NSSelectorFromString<span style="color: #000000;">(</span>@<span style="color: #ff0000;">"MyMethod:AndSecondValue:"</span><span style="color: #000000;">)</span>;<br /><span style="color: #000000;">[</span><span style="color: #00C800;">self</span> performSelector:<span style="color: #000000;">Selector</span> withObject:@<span style="color: #ff0000;">"My String"</span> withObject:<span style="color: #000000;">[</span>NSNumber numberWithInt:<span style="color: #000000;">10</span><span style="color: #000000;">]</span><span style="color: #000000;">]</span>;<br /> </div>[/code:cv6g36d9]
Asi, podriamos rutar el mensaje enviado a un objeto (usando ON ERROR) en nivel PRG y generar un selector en Objective-C. Además podemos comprobar si el objeto en Objective-C soporta ó no dicho mensaje:
[code=fw:cv6g36d9]<div class="fw" id="{CB}" style="font-family: monospace;"><br />- <span style="color: #000000;">(</span>void<span style="color: #000000;">)</span> forwardInvocation: <span style="color: #000000;"><span style="color: #000000;">(</span>NSInvocation*</span><span style="color: #000000;">)</span>anInvocation<br /><span style="color: #000000;">{</span><br /> <span style="color: #00C800;">if</span> <span style="color: #000000;">(</span><span style="color: #000000;">[</span>anObject respondsToSelector: <span style="color: #000000;">[</span>anInvocation selector<span style="color: #000000;">]</span><span style="color: #000000;">]</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">return</span> <span style="color: #000000;">[</span>anInvocation invokeWithTarget: <span style="color: #000000;">anObject</span><span style="color: #000000;">]</span>;<br /> <span style="color: #00C800;">else</span><br /> <span style="color: #00C800;">return</span> <span style="color: #000000;">[</span><span style="color: #00C800;">self</span> doesNotRecognizeSelector: <span style="color: #000000;">[</span>anInvocation selector<span style="color: #000000;">]</span><span style="color: #000000;">]</span>;<br /><span style="color: #000000;">}</span><br /> </div>[/code:cv6g36d9]
En este código entra en juego un nuevo elemento, la clase NSInvocation, que permite controlar parámetros, valor de retorno, objeto al que se envia el mensaje.
Las pegas que le veo es que desde PRG solo disponemos de un número muy límitado de "tipos". Asi que necesitariamos usar funciones que creasen los tipos extra que hiciesen falta.
La idea es crear una Clase NSObject que guardaría el handle del objeto Objective-C y que podria usarse algo así:
[code=fw:cv6g36d9]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">local</span> oWnd := NSObject<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span> UIWindowAllocInit<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /><br />oWnd:<span style="color: #000000;">setBackgroundColor</span> = ...<br /><br /><span style="color: #B900B9;">// que se traduciría a:</span><br /><br /><span style="color: #000000;">[</span> hObj setBackgroundColor : ... <span style="color: #000000;">]</span>; <span style="color: #B900B9;">// oWnd:hObj en PRG</span><br /> </div>[/code:cv6g36d9]
Bueno, aqui tenemos este camino. Tal vez podemos implementarlo como algo adicional a lo que ya tenemos... |
he conseguido un iphone | Antonio muy interesante .
El poder construir un selector desde una cadena nos da la posibilidad de poder decidir desde prg el selector a utilizar por un mismo objeto dependiendo de unas determinadas condiciones .
Una pregunta que debemos hacernos cuando trabajamos con dispositivos "pequeños" ( y no pensemos en iphone4 , sino en iphone 3g ) es cuanto penaliza este proceso en la velocidad del programa . No existe nada peor que un "usuario" desesperado por lo que tarda el programa .Digo esto porque estos dias al implementar nuevas funcionalidades en el tableview veo que la velocidad se degrada mucho cuanto mas idas y venidas a prg hagamos .
Es una cosa que tendremos que valorar , sino penaliza mucho o incluso nos da mas velocidad pues evita traspasos , puede ser muy buena idea a pesar de los contras , si degrada velocidad es el mayor "contra" para no usarlo .
Saludos <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> |
he conseguido un iphone | Implementado y subido un primer prototipo de la Clase NSObject y samples/object.prg
Aún no probado...
Editado: Manuel hagamos algunas pruebas y a ver que tal va <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> |
he conseguido un iphone | Daniel,
He modificado HB_GARBAGE_FUNC( OBJECT_release ) para solucionar los warnings que teniamos.
Habria que probar si el nuevo código funciona bien <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> |
he conseguido un iphone | Menuda barrera:
Los mensajes que enviamos desde PRG se traducen a MAYUSCULAS y no es el formato que espera Objective-C.
me parece que hemos topado por ese camino con un obstaculo insalvable...
Bueno, hemos aprendido cosas nuevas de todas formas <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> |
he conseguido un iphone | [quote="Antonio Linares":3q1qlo2l]Menuda barrera:
Los mensajes que enviamos desde PRG se traducen a MAYUSCULAS y no es el formato que espera Objective-C.
me parece que hemos topado por ese camino con un obstaculo insalvable...
Bueno, hemos aprendido cosas nuevas de todas formas <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->[/quote:3q1qlo2l]
Menuda faena . Como mal estamos como estabamos y mas sabios <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) --> |
he conseguido un iphone | Si es un "obstaculo insalvable" es una mala noticia luego de tanto trabajo de parte de ustedes y tanta expectacion de parte nuestra.
Por otro lado creo que el Window Phone OS debiera tener un alto grado de compatibilidad con el Windows Mobile.
Quizas FiveTech pueda realizar algunos experimentos con el Windows Phone aprovechando la experiencia y el exito de FWPPC.
Saludos
George |
he conseguido un iphone | [quote="George":ubo1xe27]Si es un "obstaculo insalvable" es una mala noticia luego de tanto trabajo de parte de ustedes y tanta expectacion de parte nuestra.
Por otro lado creo que el Window Phone OS debiera tener un alto grado de compatibilidad con el Windows Mobile.
Quizas FiveTech pueda realizar algunos experimentos con el Windows Phone aprovechando la experiencia y el exito de FWPPC.
Saludos
George[/quote:ubo1xe27]
George . Esto no significa que no podamos hacer nada , simplemente cierra una manera de rutar los eventos de prg a objective-c
La forma que usabamos hasta ahora sigue siendo valida , quizas necesite mas trabajo por nuestra parte , pero tambien nos acerca mas al codigo "nativo"( objective-c) del iphone.
Un saludo. |
he conseguido un iphone | George
Antonio se referia al "obstaculo insalvable" a no poder usar tecnica que se intento implemntar para el manejo de mensajes... el desarrollo continua con la tecnicas actulaes. |
he conseguido un iphone | Oh Gracias por la aclaracion. Es una buena noticia.
Entendi lo de 'obstaculo insalvable' como que no se podia seguir con las pruebas que ustedes venian haciendo con el iPhone.
Adelante y animo!
Saludos
George |
he conseguido un iphone | Probando FivePhone en el iPad y funcionando correctamente! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
[img:1sdou1n6]http://img714.imageshack.us/img714/3213/photojy.png[/img:1sdou1n6] |
he conseguido un iphone | Daniel continuo con el tema de los botones en recursos ...
Tengo avances , he subido nuevo codigo de buttons.m . Ahora no casca el programa y en la funcion de crearboton desde recursos pongo que se ponga un titulo al boton y se pone correctamente . Lo que no logro es que detecte el click del boton . Si quieres hechar un vistazo por si tengo un error de bulto tonto que no se ve....
Saludos. |
he conseguido un iphone | Antonio , viendo un codigo para iphone me encuentro con esto :
[code=fw:5tzkoo4f]<div class="fw" id="{CB}" style="font-family: monospace;"><br /># combine the two generated libraries <span style="color: #0000ff;">to</span> be used both in the simulator and in the device<br /><br />$DEVROOT/usr/bin/lipo -arch arm $LIB_DIR/$LIBNAME_static.arm -arch i386 $LIB_DIR/$LIBNAME_static.i386 -create -output $LIB_DIR/$LIBNAME_static<br /><br />$DEVROOT/usr/bin/lipo -arch arm $LIB_DIR/$LIBNAME_static2.arm -arch i386 $LIB_DIR/$LIBNAME_static2.i386 -create -output $LIB_DIR/$LIBNAME_static2<br /> </div>[/code:5tzkoo4f]
Parece una manera de generar una libreria que combina la libreria para iphone y para el simulador ....
Saludos. |
he conseguido un iphone | Manuel,
Si, gracias por el recordatorio, lo conocía de cuando construimos las primeras librerias de FiveMac y aún solicitaban powerpc e intel.
Es algo que podemos implementar en el makefile, cuando tengamos un rato <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> |
he conseguido un iphone | Antonio te cuento mas noticias sobre el tema del simulador ....
He hecho lo siguiente : he cogido todo el codigo de fivephone y lo he colocado en un proyecto de libreria de xcode . he generado una unica libreria con los archivos m y archivos c .Me ha dado 4 alertas pero se ha generado sin gran problema . Bien .... <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
Luego he generado un nuevo proyecto en xcode y le he puesto en el tuto02.c y todas las librerias de harbour y la libreria anteriormente creada ...
En principio debería generar el ejecutable ....
Pues no .
me da error al linkar ..
[code=fw:3o4u2ywo]<div class="fw" id="{CB}" style="font-family: monospace;"><br />Undefined symbols:<br /> <span style="color: #ff0000;">"_HB_FUN_TWINDOW"</span>, referenced <span style="color: #0000ff;">from</span>:<br /> _symbols_table in tutor02.o<br /> <span style="color: #ff0000;">"_HB_FUN_TLABEL"</span>, referenced <span style="color: #0000ff;">from</span>:<br /> _symbols_table in tutor02.o<br />ld: <span style="color: #000000;">symbol</span><span style="color: #000000;">(</span>s<span style="color: #000000;">)</span> not found<br />collect2: <span style="color: #000000;">ld</span> returned <span style="color: #000000;">1</span> exit status<br /><br /> </div>[/code:3o4u2ywo]
algo tengo que estar haciendo mal .
El intentar generar el programa desde xcode es porque nos sirve para ver en que nos estamos equivocando .
En otro orden de cosas mira esta pagina :[url:3o4u2ywo]http://www.gp32spain.com/foros/showthread.php?t=51206[/url:3o4u2ywo].
Aqui se ve como meten un fichero prg con sintatix resaltada en el xcode ..Seguro que ademas se puede decir que utilice harbour para pasar de prg a c <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> |
he conseguido un iphone | ...
Actualice el makefile para compilar cells.m y tblviewCell.prg
seria bueno tener un ejemplo adicional para probar estas caracteristica y con un nib diferente.... como esta actualmente no podemos probar |
he conseguido un iphone | [quote="mastintin":3jmdkjww]Daniel continuo con el tema de los botones en recursos ...
Tengo avances , he subido nuevo codigo de buttons.m . Ahora no casca el programa y en la funcion de crearboton desde recursos pongo que se ponga un titulo al boton y se pone correctamente . Lo que no logro es que detecte el click del boton . Si quieres hechar un vistazo por si tengo un error de bulto tonto que no se ve....
Saludos.[/quote:3jmdkjww]
Manuel
Pruebo esto que comentas y no obtengo resultados favorables, si podrias publicar un ejemplo seria buena idea,
Gracias |
he conseguido un iphone | [quote="Daniel Garcia-Gil":3u6knrp7]...
Actualice el makefile para compilar cells.m y tblviewCell.prg
seria bueno tener un ejemplo adicional para probar estas caracteristica y con un nib diferente.... como esta actualmente no podemos probar[/quote:3u6knrp7]
Daniel el tutornibs.prg que esta en el repositorio y el hola.nib del repositorio funcionana perfectamente ( comprobado ) .
si no te funciona , descarga de nuevo el repositorio . Por cierto los permisos de el nib en el iphone como estan ? .
Saludos.
El tutornibs.prg es asi :
[code=fw:3u6knrp7]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> oWnd := TWindow<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">local</span> oBtn <br /> <br /> <br /> oBtn = TButton<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span> oWnd, <span style="color: #ff0000;">"Button "</span> , <span style="color: #000000;">30</span>, <span style="color: #000000;">10</span>, <span style="color: #000000;">100</span>, <span style="color: #000000;">40</span> , <span style="color: #000000;">{</span>|| yoyo<span style="color: #000000;">(</span>ownd<span style="color: #000000;">)</span> <span style="color: #000000;">}</span> <span style="color: #000000;">)</span> <br /> <br /> oWnd:<span style="color: #0000ff;">Activate</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span> <br /><br /><br /><span style="color: #00C800;">Function</span> yoyo<span style="color: #000000;">(</span>ownd<span style="color: #000000;">)</span><br /><span style="color: #00C800;">local</span> oView:=tView<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #000000;">resources</span><span style="color: #000000;">(</span>ownd,<span style="color: #ff0000;">"Hola"</span><span style="color: #000000;">)</span><br /><span style="color: #00C800;">local</span> oLabel:=tLabel<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #000000;">resources</span><span style="color: #000000;">(</span>oView,<span style="color: #000000;">3</span><span style="color: #000000;">)</span><br /><span style="color: #00C800;">local</span> odp<br /><span style="color: #00C800;">local</span> obtn<br /><span style="color: #00C800;">local</span> obrw<br /><br /><br />oBrw = TTableView<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #000000;">Resources</span><span style="color: #000000;">(</span> oView, <span style="color: #000000;">55</span>, <span style="color: #000000;">{</span> <span style="color: #ff0000;">"One"</span>, <span style="color: #ff0000;">"Two"</span>, <span style="color: #ff0000;">"Three"</span>, <span style="color: #ff0000;">"Four"</span>, <span style="color: #ff0000;">"Five"</span> <span style="color: #000000;">}</span> <span style="color: #000000;">)</span><br /><br /> oBrw:<span style="color: #000000;">bSelect</span> = <span style="color: #000000;">{</span> | nRow, nSection | <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">(</span> nRow <span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /><br /> <span style="color: #B900B9;">// oBrw:bCellBack = { || "cell.png" }</span><br /> <span style="color: #B900B9;">// oBrw:bCellImage = { || "fts.png" }</span><br /> oBrw:<span style="color: #000000;">SetBackClear</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> obrw:<span style="color: #000000;">bcell</span>:= <span style="color: #000000;">{</span>| ocel,o,ele | ajustacel<span style="color: #000000;">(</span>ocel,o, ele<span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /><br /> oBrw:<span style="color: #000000;">aHeads</span> = <span style="color: #000000;">{</span> <span style="color: #ff0000;">"Cabecera"</span> <span style="color: #000000;">}</span><br /><br /><br /><span style="color: #00C800;">Return</span> <span style="color: #00C800;">nil</span><br /><br /><br /><span style="color: #00C800;">Function</span> ajustacel<span style="color: #000000;">(</span>ocel,o,ele<span style="color: #000000;">)</span><br /><span style="color: #00C800;">local</span> oCelda:= TTableViewCell<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">new</span><span style="color: #000000;">(</span><span style="color: #000000;">1</span><span style="color: #000000;">)</span><br /> oCelda:<span style="color: #000000;">hWnd</span>:= ocel<br /> oCelda:<span style="color: #000000;">SetAcessory</span><span style="color: #000000;">(</span><span style="color: #000000;">2</span><span style="color: #000000;">)</span><br /> oCelda:<span style="color: #000000;">SetDetailText</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"HOLA"</span><span style="color: #000000;">)</span><br /> oCelda:<span style="color: #000000;">SetImage</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"fts.png"</span><span style="color: #000000;">)</span><br /> oCelda:<span style="color: #000000;">SetBackView</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"cell.png"</span><span style="color: #000000;">)</span><br /><span style="color: #00C800;">if</span> ele%<span style="color: #000000;">2</span>==<span style="color: #000000;">0</span><br /> oCelda: <span style="color: #000000;">SetTextColor</span><span style="color: #000000;">(</span><span style="color: #000000;">255</span>,<span style="color: #000000;">0</span>,<span style="color: #000000;">0</span>,<span style="color: #000000;">100</span><span style="color: #000000;">)</span> <br /><span style="color: #00C800;">endif</span><br /><span style="color: #00C800;">Return</span> oCelda:<span style="color: #000000;">hWnd</span><br /><br /> <br /><br /> </div>[/code:3u6knrp7] |
he conseguido un iphone | Ampliando lo anterior ( lo de xcode ) ...es para ruby pero el sistema es similar supongo .
[url:efqzu9uf]http://www.meandmark.com/xcoderuby.pdf[/url:efqzu9uf] |
he conseguido un iphone | [quote="Daniel Garcia-Gil":1mk8r9fk][quote="mastintin":1mk8r9fk]Daniel continuo con el tema de los botones en recursos ...
Tengo avances , he subido nuevo codigo de buttons.m . Ahora no casca el programa y en la funcion de crearboton desde recursos pongo que se ponga un titulo al boton y se pone correctamente . Lo que no logro es que detecte el click del boton . Si quieres hechar un vistazo por si tengo un error de bulto tonto que no se ve....
Saludos.[/quote:1mk8r9fk]
Manuel
Pruebo esto que comentas y no obtengo resultados favorables, si podrias publicar un ejemplo seria buena idea,
Gracias[/quote:1mk8r9fk]
Lo del boton lo tengo en casa , es un nib con un solo boton y el codigo del tutor es :
[code=fw:1mk8r9fk]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> oWnd := TWindow<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">local</span> oBtn <br /> <br /> <br /> oBtn = TButton<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span> oWnd, <span style="color: #ff0000;">"Button "</span> , <span style="color: #000000;">30</span>, <span style="color: #000000;">10</span>, <span style="color: #000000;">100</span>, <span style="color: #000000;">40</span> , <span style="color: #000000;">{</span>|| yoyo<span style="color: #000000;">(</span>ownd<span style="color: #000000;">)</span> <span style="color: #000000;">}</span> <span style="color: #000000;">)</span> <br /> <br /> oWnd:<span style="color: #0000ff;">Activate</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span> <br /><br /><br /><span style="color: #00C800;">Function</span> yoyo<span style="color: #000000;">(</span>ownd<span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">local</span> oView:=tView<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #000000;">resources</span><span style="color: #000000;">(</span>ownd,<span style="color: #ff0000;">"Hola"</span><span style="color: #000000;">)</span><br /><span style="color: #00C800;">local</span> obtn:=tButton<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #000000;">resources</span><span style="color: #000000;">(</span>oView,<span style="color: #000000;">55</span>, <span style="color: #000000;">{</span>|| <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"SI"</span><span style="color: #000000;">)</span> <span style="color: #000000;">}</span><span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">Return</span> <span style="color: #00C800;">nil</span><br /><br /> <br /> </div>[/code:1mk8r9fk] |
he conseguido un iphone | Manuel
probando como comentas y usando el mismo codigo del svn, no logro cambiar el texto del boton
descarga de aqui el nib y el prg: [url:2j7xx76k]http://www.sitasoft.net/fivemac/iphone/files/button.zip[/url:2j7xx76k]
los permisos del nib los tengo 777 |
he conseguido un iphone | [quote="Daniel Garcia-Gil":1ju04vxo]Manuel
probando como comentas y usando el mismo codigo del svn, no logro cambiar el texto del boton
descarga de aqui el nib y el prg: [url:1ju04vxo]http://www.sitasoft.net/fivemac/iphone/files/button.zip[/url:1ju04vxo]
los permisos del nib los tengo 777[/quote:1ju04vxo]
Daniel he subido el nib del boton al repositorio , solo tienes que cambiar la llamada "hola" por "boton" en el prg.
el tutornibs.prg con el nib del repositorio , ¿ Tampoco te funciona ? .... que raro . Algo esta diferente . |
he conseguido un iphone | [quote="mastintin":hk6mxd0b]Antonio te cuento mas noticias sobre el tema del simulador ....
He hecho lo siguiente : he cogido todo el codigo de fivephone y lo he colocado en un proyecto de libreria de xcode . he generado una unica libreria con los archivos m y archivos c .Me ha dado 4 alertas pero se ha generado sin gran problema . Bien .... <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
Luego he generado un nuevo proyecto en xcode y le he puesto en el tuto02.c y todas las librerias de harbour y la libreria anteriormente creada ...
En principio debería generar el ejecutable ....
Pues no .
me da error al linkar ..
[code=fw:hk6mxd0b]<div class="fw" id="{CB}" style="font-family: monospace;"><br />Undefined symbols:<br /> <span style="color: #ff0000;">"_HB_FUN_TWINDOW"</span>, referenced <span style="color: #0000ff;">from</span>:<br /> _symbols_table in tutor02.o<br /> <span style="color: #ff0000;">"_HB_FUN_TLABEL"</span>, referenced <span style="color: #0000ff;">from</span>:<br /> _symbols_table in tutor02.o<br />ld: <span style="color: #000000;">symbol</span><span style="color: #000000;">(</span>s<span style="color: #000000;">)</span> not found<br />collect2: <span style="color: #000000;">ld</span> returned <span style="color: #000000;">1</span> exit status<br /><br /> </div>[/code:hk6mxd0b]
algo tengo que estar haciendo mal .
El intentar generar el programa desde xcode es porque nos sirve para ver en que nos estamos equivocando .
En otro orden de cosas mira esta pagina :[url:hk6mxd0b]http://www.gp32spain.com/foros/showthread.php?t=51206[/url:hk6mxd0b].
Aqui se ve como meten un fichero prg con sintatix resaltada en el xcode ..Seguro que ademas se puede decir que utilice harbour para pasar de prg a c <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->[/quote:hk6mxd0b]
Imagino que pide esos símbolos porque la librería no está enlazada.
En cuanto a usar el xcode, no consigo descargar las plantillas de esa página. Las tienes ? |
he conseguido un iphone | [quote="Antonio Linares":36pfaawh]
En cuanto a usar el xcode, no consigo descargar las plantillas de esa página. Las tienes ?[/quote:36pfaawh]
no , estan caidos los enlaces , pero como primera cosa he visto el pdf que he posteado encima y a ver si conseguimos que compile . |
he conseguido un iphone | [quote="mastintin":k9upnqez]Ampliando lo anterior ( lo de xcode ) ...es para ruby pero el sistema es similar supongo .
[url:k9upnqez]http://www.meandmark.com/xcoderuby.pdf[/url:k9upnqez][/quote:k9upnqez]
La pega es que los pantallazos no son del xcode actual y no aparecen esas opciones, o yo no las he encontrado <!-- s:? --><img src="{SMILIES_PATH}/icon_confused.gif" alt=":?" title="Confused" /><!-- s:? --> |
he conseguido un iphone | [quote="Daniel Garcia-Gil":2vaj5piv]Manuel
probando como comentas y usando el mismo codigo del svn, no logro cambiar el texto del boton
descarga de aqui el nib y el prg: [url:2vaj5piv]http://www.sitasoft.net/fivemac/iphone/files/button.zip[/url:2vaj5piv]
los permisos del nib los tengo 777[/quote:2vaj5piv]
Daniel resuelto .Ya se donde falla .... el temalo tienes al poner el tag en los nibs . Le estas poniendo el 15 al Object ID ( no me pregiuntes que es ) .
En la primera pestaña donde pones las propiedades si bajas al apartado view tienes un textbox que pone tag , es ahi donde le pones el numero de tag ... |
he conseguido un iphone | Compilado con xcode (añadi las librerias de fivephone que teníamos ) . Pero pasa lo mismo entra y sale ( descartado problema con el firmado ) .
Si añado todo los archivos de harbour/include tengo un problema con el archivo hbwmain.c que se intenta compilar y como tiene un windows.h que no encuentra da errores ..
Saludos |
he conseguido un iphone | Aqui es donde se puede decir a un proyecto xcode para iphone que compile los archivos prg con un determiando script .....
[img:49s5p6lx]http://img684.imageshack.us/img684/2575/screencapturebb.png[/img:49s5p6lx] |
he conseguido un iphone | Mas cosas una vez he compilado el programa para emulador con xcode y le mando a depurar esto es lo que me dice :
[code=fw:1dlcg0xg]<div class="fw" id="{CB}" style="font-family: monospace;"><br />Type <span style="color: #ff0000;">"show copying"</span> <span style="color: #0000ff;">to</span> see the conditions.<br />There is absolutely no warranty <span style="color: #00C800;">for</span> GDB. Type <span style="color: #ff0000;">"show warranty"</span> <span style="color: #00C800;">for</span> details.<br />This GDB was configured as <span style="color: #ff0000;">"x86_64-apple-darwin"</span>.<br />sharedlibrary apply-load-rules all<br />Attaching <span style="color: #0000ff;">to</span> process <span style="color: #000000;">3984</span>.<br />dyld: <span style="color: #0000ff;">Library</span> not loaded: <span style="color: #000000;">libharbour</span>.dylib<br /> Referenced <span style="color: #0000ff;">from</span>: /Users/manuel/<span style="color: #0000ff;">Library</span>/Application Support/iPhone Simulator/<span style="color: #000000;">4.1</span>/Applications/C23E314D-0D40-4E38-ABB0-75188DFF3710/tutor02.app/tutor02<br /> Reason: <span style="color: #0000ff;">image</span> not found<br /><br /><br /> </div>[/code:1dlcg0xg] |
he conseguido un iphone | Manuel,
Está buscando una librería dinámica (.dylib) de Harbour.
Intenta cambiar a estática (.a) <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> |
he conseguido un iphone | ...
Subida la accion para botones desde recursos
[img:3142azxj]http://www.sitasoft.net/fivemac/iphone/screen/btnaction.png[/img:3142azxj] |
he conseguido un iphone | Añadido methodo a la clase toolbar que permite ponerla del color que queramos .
Añadido metodo que crea botones "de sistema" ...
Añadidos a tutor05 para que se vea funcionando.
Saludos.
[img:3tt266v6]http://img543.imageshack.us/img543/3923/lafoto.png[/img:3tt266v6] |
he conseguido un iphone | Por cierto He instalado NetaTalk en el iphone y funciona de perlas ...[url:31877nn5]http://todoappleblog.com/guias/montando-el-ipad-como-unidad-de-almacenamiento-externa-desde-el-finder/[/url:31877nn5] |
he conseguido un iphone | Le he pegado un buen cambio a los navbars . Aun tienen que mejorar mucho pero algo hemos avanzado ...
Navbar ya no depende de windows . Ahora se puede colocar un navbar diferenta a cada view . Los eventos del navbar ahora son rutados a el HandleEvent de su clase y no al de windows .
He puesto el tutor07 a funcionar con todos los cambios . Ahora tenemos 2 tabs con sus respectivos views y sus respectivos navbars .
Queda pendiente el implementar el array de items del navBar y la gestion de todas las caracteristicas de los items .
Puede que sea conveniente crear una clase navbaritem , pero no estoy seguro ...
Un saludo. |
he conseguido un iphone | He añadido soporte para recursos en tabbar , pero no consiguo que detecte el cambio de tab . Parece un problema con delegate ya que no llega ni siquiera al codigo que pasa el evento a harbour .
Daniel si te apetece.... |
he conseguido un iphone | [quote="mastintin":213ey3nf]He añadido soporte para recursos en tabbar , pero no consiguo que detecte el cambio de tab . Parece un problema con delegate ya que no llega ni siquiera al codigo que pasa el evento a harbour .
Daniel si te apetece....[/quote:213ey3nf]
Por supuesto revisando.... <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> |
he conseguido un iphone | [quote="mastintin":7lr1usn5]Por cierto He instalado NetaTalk en el iphone y funciona de perlas ...[url:7lr1usn5]http://todoappleblog.com/guias/montando-el-ipad-como-unidad-de-almacenamiento-externa-desde-el-finder/[/url:7lr1usn5][/quote:7lr1usn5]
Gracias Manuel
he dejado de usar el ssh, pue se perdia constantemente la conexion con el iphone para el usar esta via...
personalmente cambie el build.sh de esta forma
[code=fw:7lr1usn5]<div class="fw" id="{CB}" style="font-family: monospace;"># <span style="color: #B900B9;">/*<br /># * $Id<br /># */</span><br /># <br /># <span style="color: #B900B9;">/*<br /># * FivePhone source code:<br /># * buildmac.sh<br /># *<br /># * Copyright 2010 Antonio Linares <alinares@fivetechsoft.com><br /># * www - <!-- m --><a class="postlink" href="http://www.fivetechsoft.com">http://www.fivetechsoft.com</a><!-- m --><br /># *<br /># * This program is free software; you can redistribute it and/or modify<br /># * it under the terms of the GNU General Public License as published by<br /># * the Free Software Foundation; either version 2, or (at your option)<br /># * any later version.<br /># *<br /># * This program is distributed in the hope that it will be useful,<br /># * but WITHOUT ANY WARRANTY; without even the implied warranty of<br /># * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the<br /># * GNU General Public License for more details.<br /># *<br /># * You should have received a copy of the GNU General Public License<br /># * along with this software; see the file COPYING. If not, write to<br /># * the Free Software Foundation, Inc., 59 Temple Place, Suite 330,<br /># * Boston, MA 02111-1307 USA (or visit the web site <!-- m --><a class="postlink" href="http://www.gnu.org/">http://www.gnu.org/</a><!-- m -->).<br /># *<br /># * As a special exception, this project gives permission for<br /># * additional uses of the text contained in the release of Harbour.<br /># *<br /># * The exception is that, if you link these libraries with other<br /># * files to produce an executable, this does not by itself cause the<br /># * resulting executable to be covered by the GNU General Public License.<br /># * Your use of that executable is in no way restricted on account of<br /># * linking this library code into it.<br /># *<br /># * This exception does not however invalidate any other reasons why<br /># * the executable file might be covered by the GNU General Public License.<br /># *<br /># * This exception applies only to the code released by this<br /># * Project under the name FivePhone. If you copy code from other<br /># * projects or Free Software Foundation releases into this project,<br /># * as the General Public License permits, the exception does<br /># * not apply to the code that you add in this way. To avoid misleading<br /># * anyone as to the status of such modified files, you must delete<br /># * this exception notice from them.<br /># *<br /># * If you write modifications of your own for FivePhone, it is your choice<br /># * whether to permit this exception to apply to your modifications.<br /># * If you do not wish that, delete this exception notice.<br /># *<br /># */</span><br />#<br /># ./build.sh<br /> <br />clear<br /><br />#ROUTE=<span style="color: #000000;">192.168</span><span style="color: #000000;">.1</span><span style="color: #000000;">.101</span><br />HARBOUR=./../../harbour<br />HARBOUR_IOS=./../../harbour_iOS<br />APPCODE=1224270C-448B-41F8-8E54-1ACE0B738EB5<br /> <br /><span style="color: #00C800;">if</span> <span style="color: #000000;">[</span> $# = <span style="color: #000000;">0</span> <span style="color: #000000;">]</span>; then<br /> echo syntax: ./build.sh file <span style="color: #000000;">[</span>options...<span style="color: #000000;">]</span><br /> exit<br />fi<br /> <br />echo compiling...<br />$HARBOUR/bin/harbour $<span style="color: #000000;">1</span> -n -I$HARBOUR/include -I./../include<br /><span style="color: #00C800;">if</span> <span style="color: #000000;">[</span> $? = <span style="color: #000000;">1</span> <span style="color: #000000;">]</span>; then<br /> exit<br />fi <br /> <br />echo compiling C module...<br />/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc<span style="color: #000000;">-4.2</span> -arch armv6 -mthumb -I$HARBOUR/include -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3<span style="color: #000000;">.2</span>.sdk $<span style="color: #000000;">1</span>.c -c <br /><br />echo linking...<br />/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc<span style="color: #000000;">-4.2</span> -arch armv6 -mthumb -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3<span style="color: #000000;">.2</span>.sdk $<span style="color: #000000;">1</span>.o \<br /> -o $<span style="color: #000000;">1</span> -L./../lib -lfive -lfivec -L$HARBOUR_IOS/lib -lhbvm -lhbrtl -lhblang -lhbrdd -lgttrm -lgtstd -lhbmacro -lrddntx -lrddcdx -lrddfpt -lhbsix -lhbcommon \<br /> -framework CoreFoundation \<br /> -framework Foundation \<br /> -framework UIKit \<br /> -framework AudioToolbox \<br /> -lobjc<br /> <br />#rm $<span style="color: #000000;">1</span>.c<br />#rm $<span style="color: #000000;">1</span>.o<br /> <br />echo done!<br /> <br />echo copying <span style="color: #0000ff;">to</span> the iPhone/iPad...<br />scp ./$<span style="color: #000000;">1</span> /Volumes/root/<span style="color: #00C800;">private</span>/<span style="color: #0000ff;">var</span>/mobile/Applications/$APPCODE/tutor.app/tutor<br /><br />#scp ./$<span style="color: #000000;">1</span> /Volumes/root/<span style="color: #00C800;">private</span>/<span style="color: #0000ff;">var</span>/mobile/Applications/$APPCODE/tutor.app/tutor<br />#ssh root@$ROUTE chmod +x /<span style="color: #0000ff;">var</span>/mobile/Applications/$APPCODE/tutor.app/tutor</div>[/code:7lr1usn5] |
he conseguido un iphone | Daniel,
A mi tambien me pasaba algo similar y supuestamente es un virus que se arregla asi:
[url:7gu0ocht]http://forums.whirlpool.net.au/archive/1317485[/url:7gu0ocht]
<!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> |
he conseguido un iphone | Antonio
tomado del post... lo que hice fue
[quote:266i8fau]
OK might have a solution. For those people still unable to SSH into their phones.
Open a terminal console on the iPhone using your favourite terminal emulator.
You may need to be root to remove the following directories.
cd /etc
rm -r ssh
rm -r ssl
now reinstall openssh and openssl through cydia. Finally reboot phone. This worked for me after the other stuff didn't.
Noticed that when I removed openssh it couldn't remove the /etc/ssh directory.
[/quote:266i8fau]
veremos los resultados |
he conseguido un iphone | ...
no funciona <!-- s:( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":(" title="Sad" /><!-- s:( -->
seguire con la via que propuso manuel |
he conseguido un iphone | He subido al repositorio un nuevo directorio que llame fivephone sintax .
Dentro tenemos dos ficheros que son los que definen los colores que tomará un archivo prg cuando se abra con xcode ...
Para instalar vamos a : /Users/xxxx/Library/Application\ Support/Developer/Shared/Xcode/Specifications ( crear este ultimo si no lo tenemos ) y dejamos los 2 archivos en este directorio .
Reiniciamos xcode si esta abierto y listo .
Es un primer paso y esta basado en unos archivos de pov-ray ( nada que ver ) por ello seguro que tenemos erratas que tendremos que correguir pero es un primer paso .
Saludos. |
he conseguido un iphone | Manuel
Magnifico... Gracias |
he conseguido un iphone | [quote="Daniel Garcia-Gil":23t92zl0]Antonio
tomado del post... lo que hice fue
[quote:23t92zl0]
OK might have a solution. For those people still unable to SSH into their phones.
Open a terminal console on the iPhone using your favourite terminal emulator.
You may need to be root to remove the following directories.
cd /etc
rm -r ssh
rm -r ssl
now reinstall openssh and openssl through cydia. Finally reboot phone. This worked for me after the other stuff didn't.
Noticed that when I removed openssh it couldn't remove the /etc/ssh directory.
[/quote:23t92zl0]
veremos los resultados[/quote:23t92zl0]
Daniel, por lo visto tambien es importante cambiar la contraseña. De alpine a otra cualquiera. |
he conseguido un iphone | [quote="mastintin":1owh02zn]He subido al repositorio un nuevo directorio que llame fivephone sintax .
Dentro tenemos dos ficheros que son los que definen los colores que tomará un archivo prg cuando se abra con xcode ...
Para instalar vamos a : /Users/xxxx/Library/Application\ Support/Developer/Shared/Xcode/Specifications ( crear este ultimo si no lo tenemos ) y dejamos los 2 archivos en este directorio .
Reiniciamos xcode si esta abierto y listo .
Es un primer paso y esta basado en unos archivos de pov-ray ( nada que ver ) por ello seguro que tenemos erratas que tendremos que correguir pero es un primer paso .
Saludos.[/quote:1owh02zn]
Manuel,
Muy bueno, gracias! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Ahora si consiguieramos llamar a Harbour desde el xcode... |
he conseguido un iphone | Por cierto por si alguien no sabe como asociar los archivos prg con xcode , para que sea este programa quien los abra por defecto , dejo aqui como hacerlo :
vamos a cuarquier archivo prg , lo seleccionamos y pulsamos cmd+i para sacar sus propiedades . En la sección abrir con selecionamos el Xcode ( normalmente se encuentra en /Developer/aplications ) y luego pulsamos el boton "cambiar todo" cerramos la ventana de información y listo .
Saludos. |
he conseguido un iphone | [quote="Antonio Linares":14uzwtph]
Ahora si consiguieramos llamar a Harbour desde el xcode...[/quote:14uzwtph]
Antonio como archivo independiente de proyecto no se puede .Ahora si lo incluimos dentro de un proyecto xcode si creo que es posible ... mira aqui que me parece que es donde está el secreto :
[url:14uzwtph]http://forums.fivetechsupport.com/viewtopic.php?f=8&t=20079&start=360#p107549[/url:14uzwtph]
Sería la bomba que apartir de un proyecto xcode para iphone pudieramos construir nuestra aplicacion depurarla y mandarla al iphone y al emulador . Yo lo he intentado metiendo las librerias de harbour y fivephone en el framework y colocando el archivo c ( el que "compila" harbour) y enlaza perfectamente y se crea el ejecutable y lo manda al iphone y lo ejecuta pero se enciende y apaga .Parece un problema con la funcion Main y UIAplication que genera harbour o algo similar .
Creo que lo suyo sería partir de un proyecto que cree xcode y su main y apartir de este main mandarlo a una funcion de inicio mymain() de harbour o algo asi ( eso creo que lo entiendes mejor tu ) .
Saludos. |
he conseguido un iphone | Manuel,
xcode tiene una consola en donde el sistema reporta errores. Ahi podemos ver cual es el error que se produce <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> |
he conseguido un iphone | [quote="Antonio Linares":2cuvge6c]Manuel,
xcode tiene una consola en donde el sistema reporta errores. Ahi podemos ver cual es el error que se produce <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->[/quote:2cuvge6c]
Antonio con el tutor07.c ....
[code=fw:2cuvge6c]<div class="fw" id="{CB}" style="font-family: monospace;"><br />Program loaded.<br />target remote-mobile /tmp/.XcodeGDBRemote<span style="color: #000000;">-256</span><span style="color: #000000;">-52</span><br />Switching <span style="color: #0000ff;">to</span> remote-macosx protocol<br />mem 0x1000 0x3fffffff cache<br />mem 0x40000000 0xffffffff none<br />mem 0x00000000 0x0fff none<br />run<br />Running…<br />Error launching remote program: <span style="color: #000000;">failed</span> <span style="color: #0000ff;">to</span> <span style="color: #0000ff;">get</span> the task <span style="color: #00C800;">for</span> process <span style="color: #000000;">3700</span>.<br />Error launching remote program: <span style="color: #000000;">failed</span> <span style="color: #0000ff;">to</span> <span style="color: #0000ff;">get</span> the task <span style="color: #00C800;">for</span> process <span style="color: #000000;">3700</span>.<br />The program being debugged is not being run.<br />The program being debugged is not being run.<br /> </div>[/code:2cuvge6c] |
he conseguido un iphone | Manuel
has subido algun codigo?? es para no repetir informacion porque tenia los tab funcionando |
he conseguido un iphone | Arreglado el tema de los tab desde recursos .El codigo estaba bien , todo el problema estaba en el nombre del recurso usado UITabBar en vez TabBar que es como se llama la clase .
Saludos. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.