Search Results

Search found 17342 results on 694 pages for 'custom draw'.

Page 105/694 | < Previous Page | 101 102 103 104 105 106 107 108 109 110 111 112  | Next Page >

  • UIScrollView Custom View rotation problem

    - by Markus
    I have a ScrollView with a Custom View. Now i have the problem with the rotation, the view has after the rotation not the correct frame pos / size. How can i call the CustomView after rotation for a reposition and resize the frame and content?! - (void)setupPage { NSUInteger nimages = 0; CGFloat cx = 0; for (; ; nimages++) { if (nimages == list.count) { break; } CustomStepView *stepView = [[CustomStepView alloc] initWithFrame:CGRectZero]; stepView.tag = nimages; if([[UIDevice currentDevice] orientation] == UIDeviceOrientationPortrait || [[UIDevice currentDevice] orientation] == UIDeviceOrientationPortraitUpsideDown) { stepView.frame = CGRectMake(cx, 0.0 , 768.0f, 926.0f); cx += 768.0; } else { stepView.frame = CGRectMake(cx, 0.0 , 1024.0f, 670.0f); cx += 1024.0; } [scrollView addSubview:stepView]; [stepView release]; } self.pageControl.numberOfPages = nimages; }

    Read the article

  • OnDataBinding firing before OnLoad of a CustomGridViewControl in a UserControl?

    - by OutOFTouch
    Hi, I have a CustomGridViewControl that is on a UserControl, the UserControl is loaded outside of the Page_Init when a treeview in the page is clicked that changes the view, than on subsequent postbacks the UserControl is loaded in Page_Init. The custom gridview is bound to a dataview that is dynamically retrieved. Problem is that the OnDataBinding of the CustomGridView is firing before the OnLoad of the CustomGridView, which is causing me to not be able to get embedded resource urls. Any suggestions? Thanks!

    Read the article

  • VSTS 2010 Create a custom Process Template

    - by AH
    Hi, I am required to create a custom Process Template on using VSTS 2010 Beta 1. Given that I did not use templates in VSTS 2008 I am not even sure where to start. The TFS and VS 2010 are all installed and configured. First I tried to create a test project and selected a built-in template "MSF for Agile Software etc." I wanted to try to modify (customize) it to begin with but was not sure how to do it. I searched high and low but could not find a sample/walkthrough/hint/help on how to develop a process template from scratch. Sorry for the messy explanation but I am kind of VERY frustrated...

    Read the article

  • OpenOffice Calc Macro: Run shell command and return output as result of custom function

    - by Mark
    I would like to write a custom OpenOffice function that runs a shell command and puts the result into the cell from which it was invoked. I have a basic macro working, but I can't find a way to capture the command's output. Function MyTest( c1 ) MyTest = Shell("bash -c "" echo hello "" ") End Function The above always returns 0. Looking at the documentation of the Shell command, I don't think it actually returns STDOUT. How would I capture the output so that I can return it in my function? Thanks!

    Read the article

  • Reading data from database and binding them to custom ListView

    - by N.K.
    I try to read data from a database i have made and to show some of the data in a row at a custom ListView. I can not understand what is my mistake. This is my code: public class EsodaMainActivity extends Activity { public static final String ROW_ID = "row_id"; //Intent extra key private ListView esodaListView; // the ListActivitys ListView private SimpleCursorAdapter esodaAdapter; // adapter for ListView DatabaseConnector databaseConnector = new DatabaseConnector(EsodaMainActivity.this); // called when the activity is first created @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_esoda_main); esodaListView = (ListView)findViewById(R.id.esodaList); esodaListView.setOnItemClickListener(viewEsodaListener); databaseConnector.open(); //Cursor cursor= databaseConnector.query("esoda", new String[] // {"name", "amount"}, null,null,null); Cursor cursor=databaseConnector.getAllEsoda(); startManagingCursor(cursor); // map each esoda to a TextView in the ListView layout // The desired columns to be bound String[] from = new String[] {"name","amount"}; // built an String array named "from" //The XML defined views which the data will be bound to int[] to = new int[] { R.id.esodaTextView, R.id.amountTextView}; // built an int array named "to" // EsodaMainActivity.this = The context in which the ListView is running // R.layout.esoda_list_item = Id of the layout that is used to display each item in ListView // null = // from = String array containing the column names to display // to = Int array containing the column names to display esodaAdapter = new SimpleCursorAdapter (this, R.layout.esoda_list_item, cursor, from, to); esodaListView.setAdapter(esodaAdapter); // set esodaView's adapter } // end of onCreate method @Override protected void onResume() { super.onResume(); // call super's onResume method // create new GetEsodaTask and execute it // GetEsodaTask is an AsyncTask object new GetEsodaTask().execute((Object[]) null); } // end of onResume method // onStop method is executed when the Activity is no longer visible to the user @Override protected void onStop() { Cursor cursor= esodaAdapter.getCursor(); // gets current cursor from esodaAdapter if (cursor != null) cursor.deactivate(); // deactivate cursor esodaAdapter.changeCursor(null); // adapter now has no cursor (removes the cursor from the CursorAdapter) super.onStop(); } // end of onStop method // this class performs db query outside the GUI private class GetEsodaTask extends AsyncTask<Object, Object, Cursor> { // we create a new DatabaseConnector obj // EsodaMainActivity.this = Context DatabaseConnector databaseConnector = new DatabaseConnector(EsodaMainActivity.this); // perform the db access @Override protected Cursor doInBackground(Object... params) { databaseConnector.open(); // get a cursor containing call esoda return databaseConnector.getAllEsoda(); // the cursor returned by getAllContacts() is passed to method onPostExecute() } // end of doInBackground method // here we use the cursor returned from the doInBackground() method @Override protected void onPostExecute(Cursor result) { esodaAdapter.changeCursor(result); // set the adapter's Cursor databaseConnector.close(); } // end of onPostExecute() method } // end of GetEsodaTask class // creates the Activity's menu from a menu resource XML file @Override public boolean onCreateOptionsMenu(Menu menu) { super.onCreateOptionsMenu(menu); MenuInflater inflater = getMenuInflater(); inflater.inflate(R.menu.esoda_menu, menu); // inflates(eµf?s?) esodamainactivity_menu.xml to the Options menu return true; } // end of onCreateOptionsMenu() method //handles choice from options menu - is executed when the user touches a MenuItem @Override public boolean onOptionsItemSelected(MenuItem item) { // creates a new Intent to launch the AddEditEsoda Activity // EsodaMainActivity.this = Context from which the Activity will be launched // AddEditEsoda.class = target Activity Intent addNewEsoda = new Intent(EsodaMainActivity.this, AddEditEsoda.class); startActivity(addNewEsoda); return super.onOptionsItemSelected(item); } // end of method onPtionsItemSelected() // event listener that responds to the user touching a esoda's name in the ListView OnItemClickListener viewEsodaListener = new OnItemClickListener() { @Override public void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) { // create an intent to launch the ViewEsoda Activity Intent viewEsoda = new Intent(EsodaMainActivity.this, ViewEsoda.class); // pass the selected esoda's row ID as an extra with the Intent viewEsoda.putExtra(ROW_ID, arg3); startActivity(viewEsoda); // start viewEsoda.class Activity } // end of onItemClick() method }; // end of viewEsodaListener } // end of EsodaMainActivity class The statement: Cursor cursor=databaseConnector.getAllEsoda(); queries all data (columns) From the data I want to show at my custom ListView 2 of them: "name" and "amount". But I still get a debugger error. Please help.

    Read the article

  • Custom UI design in Sencha and othere touch framworks

    - by vWebby
    Can someone please guide me regarding which touch framework (javascript) I should use to make a tablet app? I am new to this area and I am looking for something which allows me to play with my own UI design comfortably. I went through sencha as I heard its apt for a tablet app environment but I am (sorry, it might sound odd) not able to make out whether I can use my own UI design to make app in sencha. Or any other framework (stable) allows to use custom UI design?? Any help regarding this is appreciated .. thanks in advance

    Read the article

  • VB.NET custom user control graphics rotation

    - by AtharvaI
    Hi, this is my first question on here. I'm trying to build a dial control as a custom user control in VB.NET. I'm using VS2008. so far I have managed to rotate image using graphics.rotatetransform . however, this rotate everything. Now I have a Bitmap for the dial which should stay stable and another Bitmap for the needle which I need to rotate. so far i've tried this: Dim gL As Graphics = Graphics.FromImage(bmpLongNeedle) gL.TranslateTransform(bmpLongNeedle.Width / 2, bmpLongNeedle.Height * 0.74) gL.RotateTransform(angleLongNeedle) gL.TranslateTransform(-bmpLongNeedle.Width / 2, -bmpLongNeedle.Height * 0.74) gL.DrawImage(bmpLongNeedle, 0, 0) As I understand it, the image of the needle should be rotated at angle "angleLongNeedle" although i'm placing the rotated image at 0,0. However, the result is that the Needle doesn't get drawn on the control. any pointers as to where I might be going wrong or something else I should be doing? Thanks in advance

    Read the article

  • Starting mongrel with a custom command line argument

    - by whaka
    I would like to be able to start a mongrel or webrick server by passing an extra command line argument that I can read somewhere inside my rails application. An example would be: ruby script/server -p3000 --target=FOO Here, --target is a custom switch who's value I would like to intercept in my rails application. However, this yields the error: server: invalid option: --target=FOO I found mongrel documentation which mentions a -C (--config=PATH) argument specifying a full path to a yml configuration file, but specifying that switch gives the same error as above. I presume this option is deprecated. Is there another way to accomplish this?

    Read the article

  • Get products to display on custom Magento page

    - by Eric
    How can you get products to display on a custom Magento page? Naturally, this is not an uncommon question but nothing that I've seen has solved it for me. The common response is to put the following code in through the CMS editor: {{block type="catalog/product_list" name="home.catalog.product.list" alias="products_homepage” template=”catalog/product/list.phtml”}} Which just displays the message "There are no products matching the selection." on my page. Other websites advise reindexing the data through the Magento admin controls, clearing the Magento cache, and making sure products are set to a store, none of which helped in my case. Anyone have any ideas?

    Read the article

  • Drupal 7 Custom Module Error

    - by Bob
    I'm playing with a custom module in Drupal, but it gives me the following two warnings: Warning: Invalid argument supplied for foreach() in menu_unserialize() (line 377 of /site/includes/menu.inc). Warning: Invalid argument supplied for foreach() in menu_unserialize() (line 377 of /site/includes/menu.inc). Here is the module's code: <?php function homepage_coords_menu(){ $items = array('homepage_coords/%/%/%' => array( 'page callback' => 'homepage_coords_ajax_callback', 'page arguments' => array(1,2,3), 'access arguments' => TRUE, 'type' => MENU_CALLBACK, )); return $items; } function homepage_coords_ajax_callback($nid=0,$x=0,$y=0){ return 'nid:'.$nid.' x:'.$x.' y:'.$y; } ?> What can I do to fix these warnings? Also any effeciency improvements would be appreciated :)

    Read the article

  • Proper error handling in a custom Zend_Autoloader?

    - by Pekka
    I'm building a custom autoloader based on Zend Framework's autoloading (related question here). The basic approach, taken from that question, is class My_Autoloader implements Zend_Loader_Autoloader_Interface { public function autoload($class) { // add your logic to find the required classes in here } } and then binding the new autoloader class to a class prefix. Now what I'm unsure about is how to handle errors inside the autoload method (for example, "class file not found") in a proper, ZF compliant way. I'm new to the framework, its conventions and style. Do I quietly return false and let the class creation process crash? Do I output an error or log message somehow (which would be nice to pinpoint the problem) and return false? If so, what is the Zend way of doing that? Do I trigger an error? Do I throw an exception? If so, what kind?

    Read the article

  • Use google analytics custom events for feedback form.

    - by chacko
    I was thinking of having a simple feedback form in my website. It would be something like: Your Feedback will help us improve. [ ] and then a textfield/textarea where the user can type (let's say) up to 100 characters of feedback. Rather than handling it all myself on the serverside I was thinking to use google analytics (since my site is already wireup) and everytime a user writes a comment send a custom event to google analytics. I think it might work. Can people suggest a better approach or point out any problem with this idea thanks

    Read the article

  • .net and java deployment

    - by rajshades
    dear all we have a website developed in java and .net. it works fine. but now we want to develop a installer in .net for the deployment of website. which should deploy both modules means java and .net . i know about custom installer in .net but how can i deploy java module through this installer???????

    Read the article

  • Creating/populating Javascript custom object

    - by Ek0nomik
    I've created an ashx page which is going to serve me an XML document full of basic user information. I'm not sure which is the best way to go about creating and populating my custom javascript object. I've seen them created in two ways: function User() { this.Id; this.FirstName; this.LastName; this.Title; } and var User2 = { Id: null, FirstName: null, LastName: null, Title: null } I could populate each of these by doing something like: //first object User.Id = 1 //second object User2.FirstName = 'John' Is one method of creating the object better than the other?

    Read the article

  • Drupal, Views, Exposed filter: custom default selected tags

    - by Patrick
    hi I'm using Drupal, Views with a exposed filter (using taxonomy). My customer wants to set from back-end the default selected tags (in order to pre-filter the views content). In the exposed filter settings, there is functionality. However, it doesn't work properly: when I click on "Select None" link (I'm using better_exposed_filter module) I expect none of the tags are selected, instead, the default configuration (default selected tags) are selected, so actually it doesn't work anymore. I hope it is clear. So, I was wondering if I can prepare a custom menu in which my user can check/uncheck the default selected tags in the view. thanks

    Read the article

  • Custom object based on database table

    - by Archangel
    Suppose that I have a database query which looks like below - select name, gender, birthday from person where person_id = 1; When this query is executed, some records from the database are returned. I want to make a custom object which will contain the exact attributes as the column names, with the corresponding values. As an example, suppose that the object is X. So it will have three attributes which are X.name, X.gender and X.birthday, with the corresponding values from the records. Is it doable in PHP? If so, then how?

    Read the article

  • Customizing jTable

    - by gmile
    I need to customize my jTable. All I need, is to put a custom Swing object (like jButon, jPanel, etc.) into the table cell. Is it possible? I'm trying: jTable.getModel.setValueAt(jPanel1,0,0) and jTable.getModel.setValueAt(jPanel1.getUI(),0,0) But the result is only a some kind of string, representing the object... Any ideas?

    Read the article

  • Custom configuration file custom_config.js not working?

    - by nanoquetz9l
    Hello gals/guys, I am trying to use a custom configuration file instead of the default config.js file in the ckeditor root. I have placed a renamed copy of the config.js file in my webroot and call it with customConfig. It is not working for me though. Is my syntax creating any issues? I used the dev docs site as a ref: http://docs.cksource.com/CKEditor_3.x/D ... igurations Any ides or comments will really help me out. Im stuck. Thanks!! nano <p></p> CKEDITOR.replace( 'ticket_text' ); CKEDITOR.replace( 'ticket_text1', { customConfig : '/ckeditor/custom_config.js' });

    Read the article

  • Custom Trigger Scripts for Bot (Xcode 5 CI)

    - by Mishal Shah
    I am working on setting up CI for my iOS application and I am facing some issues. Where is a good place to find documents on Bot? I have seen the Xcode help but cant find any good example, also watched the CI video from 2013 conference How do i create a custom trigger script, so every time a developer commits their code it will automatically trigger the bot. How do I merge the code to master only if Test successfully passes the bot? Here is where I found info about trigger scripts https://help.apple.com/xcode/mac/1.0/#apdE6540C63-ADB5-4B07-89B7-6223EC40B59C Example values are shown with each setting. Schedule: Choose to run manually, periodically, on new commits, or on trigger scripts. Thank you!

    Read the article

  • custom helpers inside each block

    - by Unspecified
    myArray = [{name: "name1", age: 20}, {name: "name2", age:22}]; {{#each person in myArray}} {{#myHelper person}} Do something {{/myHelper}} {{/each}} Handlebars.registerHelper(function(context, options){ if(context.age > 18){ return options.fn(this); }else{ return options.inverse(this); } }) In the above code when I tried to debug my custom helper it shows the context="person" while I want the context to be the person object, what's wrong with my code ? I found a similar question here but did not get it either...

    Read the article

  • iPhone How to set a clearcolor for my custom view

    - by user355066
    Hi, I am creating a custom StyleLabel by extending the UIView, which provides a link for particular type of strings. I have successfully implemented this functionality. I am using this label in TableViewCell along with UILabel.i set UILabel & StyleLabel background color is set to clearColor. UILabel works fine, but StyleLabel shows background in blackColor. I am not sure what is the problem with the following code. Here is the drawRect method of CustomLabel class -(void) drawRect:(CGRect)rect { CGContextRef ctx = UIGraphicsGetCurrentContext(); CGContextClearRect(ctx, rect); [[UIColor clearColor] setFill]; CGContextAddRect(ctx, rect); CGContextDrawPath(ctx, kCGPathFill); [_text drawText:ctx]; } Thanks Sasikumar

    Read the article

  • Create a callback function within a custom jQuery function

    - by Thomas
    I'm not sure how to approach this as I am fairly new to jQuery. I'm wanting to create a callback function within a custom function. Here's my example: function doSomething() { var output = 'output here'; // Do something here // This is where I want to create the callback function and pass output as a parameter } I want the callback function to be accessible by any number of scripts (e.g. more than one script can access this callback). This function (doSomething) is not part of a plugin but rather part of another callback function itself. I've also created a var within the function and want to pass that through the callback function as well. How can I do this?

    Read the article

  • VB6 Printer Page Size Problem

    - by mRt
    I am trying to set a custom paper size by doing: Printer.Height = 2160 Printer.Width = 11900 But it doesn't seen to have any effect. After setting this up, i ask for that values and it returns the default ones. And this: Printer.PaperSize = 256 Returns an error... Any ideas??

    Read the article

  • Custom ListView Row, can no longer select rows...

    - by LDK
    Here's my ScrollView: middle: SC.ScrollView.design({ layout: { top: 36, bottom: 32, left: 0, right: 0 }, backgroundColor: '#ccc', contentView: SC.ListView.design({ contentBinding: 'Spanish.wordsController.arrangedObjects', selectionBinding: 'Spanish.wordsController.selection', contentValueKey: "word", contentDisplayProperties: 'word english'.w(), selectOnMouseDown: YES, exampleView: Spanish.CustomListItemView }) }) and here is my custom listView row: Spanish.CustomListItemView = SC.View.extend({ render: function(context, firstTime){ var content = this.get('content'); var word = content.get('word'); var english = content.get('english'); context = context.begin().push('&nbsp;%@ (%@)'.fmt(word,english)).end(); return sc_super(); } }); The above works as expected, except that I can no longer select views. When I comment out "exampleView: Spanish.CustomListItemView" I can select rows, but they are no longer formatted properly. Why can I no longer select rows when I use exampleView?

    Read the article

  • Custom ArrayList serialization

    - by rayman
    Hi, i was trying to serialize an ArrayList which contacins custom objects. I`am serializing it in a servlet(server side), and deserialize at the client side. (using ObjectOutputStream,ObjectInputStream) it worked fine, when I work with ArrayList< String but when i tried it with ArrayList< MyObject i couldnt get any results in the client side, this is the exception: java.lang.ClassNotFoundException: web.MyObject *ofcourse that i have done this: MyObject implements Serializable ... MyObject contains only String fields in it. what have I done worng? Thanks, ray.

    Read the article

< Previous Page | 101 102 103 104 105 106 107 108 109 110 111 112  | Next Page >