Search Results

Search found 3 results on 1 pages for 'codelizard'.

Page 1/1 | 1 

  • Safari openwindow function behavior on iPad versus iPhone

    - by CodeLizard
    An identical javascript:openwindow call with a link to Google maps opens in Safari on the iPad but in the Google Maps App on the iPhone. Why the difference? <html> <head> </head> <body> <a title="View an area map for this property" href="javascript:openwindow ('http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=1+Infinite+Loop, +Cupertino,+CA%E2%80%8E&sll=37.329389, -122.029696&sspn=0.015714,0.033023&ie=UTF8&hq=&hnear=1+Infinite+Loop, +Cupertino,+Santa+Clara, +California+95014&ll=37.331539, -122.030704&spn=0.007857,0.016512&z=17&ssa=1', 760, 500,'yes', 'yes')"> <font face="arial,helvetica" color="#000000" size="-1">Map It</font> </a> </body> <script> function openwindow(url,width,height,resizable,scrollbars,posx,posy) { if(posx==null)posx=20; if(posy==null)posy=20; now=new Date(); var x_offset=0; var y_offset=0; try { if(window.screen.left != undefined && window.screen.top != undefined) { x_offset=window.screen.left; y_offset=window.screen.top; } }catch(e){} var window_x=posx+x_offset; var window_y=posy+y_offset; new_window=window.open(url,now.getTime(),'width='+width+',height='+height+', resizable='+resizable+',scrollbars='+scrollbars+',top='+window_y+', left='+window_x+',screenX='+window_x+',screenY='+window_y); if(!new_window.opener) new_window.opener=self; try { new_window.focus(); }catch(e){} } </script> </html>

    Read the article

  • Macro C++ Issues __VA_ARGS__

    - by CodeLizard
    What (if any) are some potential problems with a C++ macro usage like this? Would an inline function be a more appropriate solution? #define EVENT_INFO(_format_, ...) CMyEvent::Generate(__FILE__, __LINE__, CMyEvent::EVT_HIGH, _format_, __VA_ARGS__) void CMyEvent::Generate( const char* file, // filename int line, // line number CMyEvent::LEVEL level, // severity level const char *format, // format of the msg / data ...) // variable arguments { // Get a message from the pool CMyEvent* p_msg = GetMessageFromPool(); if(p_msg != NULL) { va_list arguments; // points to each unnamed argument va_start(arguments, format); // Fill the object with strings and data. p_msg->Fill(file, line, level, 0, format, arguments); va_end(arguments); } }

    Read the article

1